提交 93a07427 编写于 作者: Q qiang

Merge branch 'dev' into alpha

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