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

Merge branch 'dev' of https://github.com/dcloudio/uni-app into v3

......@@ -26,7 +26,7 @@ module.exports = (api, options) => {
require('./lib/options')(options)
api.configureWebpack(require('./lib/configure-webpack')(platformOptions, manifestPlatformOptions, options, api))
api.chainWebpack(require('./lib/chain-webpack')(platformOptions, api))
api.chainWebpack(require('./lib/chain-webpack')(platformOptions, options, api))
}
module.exports.defaultModes = {
......
......@@ -12,7 +12,7 @@ function resolve (dir) {
return path.resolve(__dirname, '..', dir)
}
module.exports = function chainWebpack (platformOptions, api) {
module.exports = function chainWebpack (platformOptions, vueOptions, api) {
const {
runByHBuilderX, // 使用 HBuilderX 运行
cssPreprocessOptions
......@@ -94,7 +94,7 @@ module.exports = function chainWebpack (platformOptions, api) {
})
}
platformOptions.chainWebpack(webpackConfig, api)
platformOptions.chainWebpack(webpackConfig, vueOptions, api)
// define
webpackConfig
.plugin('uni-define')
......
......@@ -101,7 +101,7 @@ module.exports = {
plugins
}
},
chainWebpack (webpackConfig, api) {
chainWebpack (webpackConfig, vueOptions, api) {
webpackConfig.plugins.delete('copy')
if (!process.env.UNI_OPT_PREFETCH) {
......
......@@ -154,7 +154,7 @@ module.exports = {
]
}
},
chainWebpack (webpackConfig, api) {
chainWebpack (webpackConfig, vueOptions, api) {
if (process.env.UNI_PLATFORM === 'mp-baidu') {
webpackConfig.module
.rule('js')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册