7f539609 by simon

默认提交

1 parent 916b069a
NODE_ENV = 'production'
VUE_APP_TITLE = 'fev'
NODE_ENV = 'production'
VUE_APP_TITLE = 'production'
\ No newline at end of file
VUE_APP_TITLE = 'sandbox'
......
......@@ -2,6 +2,7 @@
node_modules
/dist
/fev
/sandbox
# local env files
.env.local
......
......@@ -6,7 +6,7 @@
"serve": "vue-cli-service serve",
"dev": "vue-cli-service serve",
"build": "vue-cli-service build --no clean",
"fev": "vue-cli-service build --mode fev",
"sandbox": "vue-cli-service build --mode sandbox",
"lint": "vue-cli-service lint",
"oss": "node build/oss-released.js"
},
......
......@@ -15,10 +15,11 @@ let plugins = [
if (process.env.NODE_ENV === 'production') {
// 生产环境
webpack_public_path = process.env.VUE_APP_TITLE
webpack_public_path = process.env.VUE_APP_TITLE;
plugins.push(
new PrerenderSPAPlugin({
staticDir: path.join(__dirname, 'dist'),
staticDir: path.join(__dirname, webpack_public_path || 'dist'), // 如果没配置环境目录(生产),则写到目录dist
routes: ['/', '/demo', '/about'],
renderer: new Renderer({
inject: {
......