Commit 7f1d0456880809b9531a18b6458bccd881caed8e

Authored by ly525
1 parent d47c91f2

build(landing-page) update main app publicPath

docs/.vuepress/config.js
@@ -75,7 +75,7 @@ module.exports = { @@ -75,7 +75,7 @@ module.exports = {
75 themeConfig: { 75 themeConfig: {
76 nav: [ 76 nav: [
77 { text: 'Document(En)', link: 'https://www.yuque.com/liuyan-ew1qk/oh5d0n?language=en-us' }, 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 versions: [ 80 versions: [
81 ['zh', '/zh/'], 81 ['zh', '/zh/'],
front-end/h5/vue.config.js
1 const path = require('path') 1 const path = require('path')
  2 +const isProd = process.env.NODE_ENV === 'production'
2 const target = 'http://localhost:1337' 3 const target = 'http://localhost:1337'
3 const engineOutputDir = path.join(__dirname, '../../back-end/h5-api/public/engine-assets') 4 const engineOutputDir = path.join(__dirname, '../../back-end/h5-api/public/engine-assets')
4 5
@@ -17,7 +18,8 @@ switch (process.env.PAGE) { @@ -17,7 +18,8 @@ switch (process.env.PAGE) {
17 template: 'public/index.html', 18 template: 'public/index.html',
18 filename: 'index.html', 19 filename: 'index.html',
19 title: 'Index Page', 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,6 +33,7 @@ const configureWebpack = {
31 33
32 module.exports = { 34 module.exports = {
33 outputDir: page.outputDir, 35 outputDir: page.outputDir,
  36 + publicPath: page.publicPath,
34 lintOnSave: process.env.NODE_ENV !== 'production', 37 lintOnSave: process.env.NODE_ENV !== 'production',
35 productionSourceMap: process.env.NODE_ENV !== 'production', 38 productionSourceMap: process.env.NODE_ENV !== 'production',
36 pages: { index: page }, 39 pages: { index: page },