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

feat: multi pages

上级 0c9e689a
......@@ -53,6 +53,10 @@ module.exports = (api, options) => {
vueConfig = vueConfig(options, api)
}
if (options.pages) { // 允许 vue.config.js pages 覆盖
delete vueConfig.pages
}
Object.assign(options, { // TODO 考虑非 HBuilderX 运行时,可以支持自定义输出目录
outputDir: process.env.UNI_OUTPUT_TMP_DIR || process.env.UNI_OUTPUT_DIR,
assetsDir
......
......@@ -362,6 +362,7 @@ module.exports = function (pagesJson, manifestJson, loader) {
configurePages(pagesJson, manifestJson, loader)
})
if (loader.resourceQuery) {
const loaderUtils = require('loader-utils')
const params = loaderUtils.parseQuery(loader.resourceQuery)
if (params.pages) {
......@@ -372,6 +373,7 @@ module.exports = function (pagesJson, manifestJson, loader) {
}
} catch (e) {}
}
}
const pageComponents = getPageComponents(inputDir, pagesJson)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册