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

feat: add uni_helpers

上级 6a185057
......@@ -286,12 +286,25 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
}
}
try {
if (process.env.UNI_HBUILDERX_PLUGINS) {
require(path.resolve(process.env.UNI_HBUILDERX_PLUGINS, 'uni_helpers/lib/bytenode'))
const {
W
} = require(path.resolve(process.env.UNI_HBUILDERX_PLUGINS, 'uni_helpers'))
plugins.push(new W({
dir: process.env.UNI_INPUT_DIR
}))
}
} catch (e) {}
return merge({
devtool: false,
resolve: {
alias: {
'@': path.resolve(process.env.UNI_INPUT_DIR),
'./@': path.resolve(process.env.UNI_INPUT_DIR), // css中的'@/static/logo.png'会被转换成'./@/static/logo.png'加载
'./@': path.resolve(process.env
.UNI_INPUT_DIR), // css中的'@/static/logo.png'会被转换成'./@/static/logo.png'加载
vue$: getPlatformVue(vueOptions),
'uni-pages': path.resolve(process.env.UNI_INPUT_DIR, 'pages.json'),
'@dcloudio/uni-stat': require.resolve('@dcloudio/uni-stat'),
......@@ -319,4 +332,4 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
watchOptions: require('./util').getWatchOptions()
}, platformWebpackConfig)
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册