提交 14817547 编写于 作者: Q qiang

Merge branch 'v3' into dev

# Conflicts:
#	packages/vue-cli-plugin-uni/lib/env.js
......@@ -123,7 +123,7 @@ module.exports = function generate (ast, state) {
const replaceCodes = state.options.replaceCodes
if (replaceCodes) {
Object.keys(replaceCodes).forEach(key => {
code = code.replace(key, replaceCodes[key])
code = code.replace(new RegExp(key.replace('$', '\\$'), 'g'), replaceCodes[key])
})
}
......
......@@ -264,6 +264,10 @@ if (process.env.UNI_USING_V3 && process.env.UNI_PLATFORM === 'app-plus') {
moduleAlias.addAlias('vue-style-loader', '@dcloudio/vue-cli-plugin-uni/packages/app-vue-style-loader')
}
if (process.env.UNI_PLATFORM === 'h5') {
moduleAlias.addAlias('vue-style-loader', '@dcloudio/vue-cli-plugin-uni/packages/h5-vue-style-loader')
}
// vue cache
if ( // 非 h5 ,非 v3,非 native
process.env.UNI_PLATFORM !== 'h5' &&
......
try {
var vueVersion = require('vue').version
} catch (e) {}
// try {
// var vueVersion = require('vue').version
// } catch (e) {}
var packageName = require('./package.json').name
var packageVersion = require('./package.json').version
if (vueVersion && vueVersion !== packageVersion) {
var vuePath = require.resolve('vue')
var packagePath = require.resolve('./package.json')
throw new Error(
'\n\nVue packages version mismatch:\n\n' +
'- vue@' + vueVersion + ' (' + vuePath + ')\n' +
'- ' + packageName + '@' + packageVersion + ' (' + packagePath + ')\n\n' +
'This may cause things to work incorrectly. Make sure to use the same version for both.\n' +
'If you are using vue-loader@>=10.0, simply update vue-template-compiler.\n' +
'If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump ' + packageName + ' to the latest.\n'
)
}
// var packageName = require('./package.json').name
// var packageVersion = require('./package.json').version
// if (vueVersion && vueVersion !== packageVersion) {
// var vuePath = require.resolve('vue')
// var packagePath = require.resolve('./package.json')
// throw new Error(
// '\n\nVue packages version mismatch:\n\n' +
// '- vue@' + vueVersion + ' (' + vuePath + ')\n' +
// '- ' + packageName + '@' + packageVersion + ' (' + packagePath + ')\n\n' +
// 'This may cause things to work incorrectly. Make sure to use the same version for both.\n' +
// 'If you are using vue-loader@>=10.0, simply update vue-template-compiler.\n' +
// 'If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump ' + packageName + ' to the latest.\n'
// )
// }
module.exports = require('./build')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册