Commit 4f6eb677 by 杨北旺

修改config配置

1 parent ff4513c0
const path = require('path') const path = require('path')
const packageName = require('./package.json').name const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production' const node_env = process.env.NODE_ENV === 'production'
// const baseUrl = process.env.VUE_APP_BASE_URL; // const baseUrl = process.env.VUE_APP_BASE_URL;
const baseUrl = '/' const publicPath = node_env ? `/child/${packageName}/` : '/'
// const baseUrl = '/'
const resolve = dir => path.join(__dirname, dir) const resolve = dir => path.join(__dirname, dir)
module.exports = { module.exports = {
outputDir: `dist`, outputDir: `dist`,
publicPath: node_env ? baseUrl : '/', publicPath: publicPath,
assetsDir: 'static', assetsDir: 'static',
configureWebpack: { configureWebpack: {
resolve: { resolve: {
...@@ -49,4 +50,4 @@ module.exports = { ...@@ -49,4 +50,4 @@ module.exports = {
}) })
.end() .end()
} }
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!