Commit 7f1d0456880809b9531a18b6458bccd881caed8e
1 parent
d47c91f2
build(landing-page) update main app publicPath
Showing
2 changed files
with
5 additions
and
2 deletions
docs/.vuepress/config.js
| ... | ... | @@ -75,7 +75,7 @@ module.exports = { |
| 75 | 75 | themeConfig: { |
| 76 | 76 | nav: [ |
| 77 | 77 | { text: 'Document(En)', link: 'https://www.yuque.com/liuyan-ew1qk/oh5d0n?language=en-us' }, |
| 78 | - { text: 'Website', link: 'https://api.luban-h5.wxjcart.com' }, | |
| 78 | + { text: 'Website', link: 'https://api.luban-h5.wxjcart.com/main' }, | |
| 79 | 79 | ], |
| 80 | 80 | versions: [ |
| 81 | 81 | ['zh', '/zh/'], | ... | ... |
front-end/h5/vue.config.js
| 1 | 1 | const path = require('path') |
| 2 | +const isProd = process.env.NODE_ENV === 'production' | |
| 2 | 3 | const target = 'http://localhost:1337' |
| 3 | 4 | const engineOutputDir = path.join(__dirname, '../../back-end/h5-api/public/engine-assets') |
| 4 | 5 | |
| ... | ... | @@ -17,7 +18,8 @@ switch (process.env.PAGE) { |
| 17 | 18 | template: 'public/index.html', |
| 18 | 19 | filename: 'index.html', |
| 19 | 20 | title: 'Index Page', |
| 20 | - outputDir: 'dist' | |
| 21 | + outputDir: 'dist', | |
| 22 | + publicPath: isProd ? '/main/' : '/' | |
| 21 | 23 | } |
| 22 | 24 | } |
| 23 | 25 | |
| ... | ... | @@ -31,6 +33,7 @@ const configureWebpack = { |
| 31 | 33 | |
| 32 | 34 | module.exports = { |
| 33 | 35 | outputDir: page.outputDir, |
| 36 | + publicPath: page.publicPath, | |
| 34 | 37 | lintOnSave: process.env.NODE_ENV !== 'production', |
| 35 | 38 | productionSourceMap: process.env.NODE_ENV !== 'production', |
| 36 | 39 | pages: { index: page }, | ... | ... |