提交 66a6308f 编写于 作者: fxy060608's avatar fxy060608

feat(v3): remove provide(uni,plus)

上级 99911b9c
...@@ -37,13 +37,15 @@ const uniPath = process.env.UNI_USING_V8 ...@@ -37,13 +37,15 @@ const uniPath = process.env.UNI_USING_V8
: '../packages/uni-app-plus-nvue/dist/index.js' : '../packages/uni-app-plus-nvue/dist/index.js'
const provide = {} const provide = {}
if (!process.env.UNI_USING_NATIVE) { if (!process.env.UNI_USING_V3) {
provide['uni'] = [path.resolve(__dirname, uniPath), 'default'] if (!process.env.UNI_USING_NATIVE) {
} provide['uni'] = [path.resolve(__dirname, uniPath), 'default']
}
if (process.env.UNI_USING_V8) {
provide['plus'] = [path.resolve(__dirname, uniPath), 'weexPlus'] if (process.env.UNI_USING_V8) {
provide['plus'] = [path.resolve(__dirname, uniPath), 'weexPlus']
}
} }
if ( if (
......
...@@ -178,7 +178,7 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt ...@@ -178,7 +178,7 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
let platformWebpackConfig = platformOptions.webpackConfig let platformWebpackConfig = platformOptions.webpackConfig
if (typeof platformWebpackConfig === 'function') { if (typeof platformWebpackConfig === 'function') {
platformWebpackConfig = platformWebpackConfig(webpackConfig, api) platformWebpackConfig = platformWebpackConfig(webpackConfig, vueOptions, api)
} }
// 移除 node_modules 目录,避免受路径上的 node_modules 影响 // 移除 node_modules 目录,避免受路径上的 node_modules 影响
webpackConfig.resolve.modules = webpackConfig.resolve.modules.filter(module => module !== webpackConfig.resolve.modules = webpackConfig.resolve.modules.filter(module => module !==
......
...@@ -62,7 +62,7 @@ module.exports = { ...@@ -62,7 +62,7 @@ module.exports = {
vueConfig: { vueConfig: {
parallel: false parallel: false
}, },
webpackConfig (webpackConfig, api) { webpackConfig (webpackConfig, vueOptions, api) {
if (!webpackConfig.optimization) { if (!webpackConfig.optimization) {
webpackConfig.optimization = {} webpackConfig.optimization = {}
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册