默认提交
Showing
5 changed files
with
6 additions
and
6 deletions
.env.fev
deleted
100644 → 0
... | @@ -6,7 +6,7 @@ | ... | @@ -6,7 +6,7 @@ |
6 | "serve": "vue-cli-service serve", | 6 | "serve": "vue-cli-service serve", |
7 | "dev": "vue-cli-service serve", | 7 | "dev": "vue-cli-service serve", |
8 | "build": "vue-cli-service build --no clean", | 8 | "build": "vue-cli-service build --no clean", |
9 | "fev": "vue-cli-service build --mode fev", | 9 | "sandbox": "vue-cli-service build --mode sandbox", |
10 | "lint": "vue-cli-service lint", | 10 | "lint": "vue-cli-service lint", |
11 | "oss": "node build/oss-released.js" | 11 | "oss": "node build/oss-released.js" |
12 | }, | 12 | }, | ... | ... |
... | @@ -15,10 +15,11 @@ let plugins = [ | ... | @@ -15,10 +15,11 @@ let plugins = [ |
15 | 15 | ||
16 | if (process.env.NODE_ENV === 'production') { | 16 | if (process.env.NODE_ENV === 'production') { |
17 | // 生产环境 | 17 | // 生产环境 |
18 | webpack_public_path = process.env.VUE_APP_TITLE | 18 | webpack_public_path = process.env.VUE_APP_TITLE; |
19 | |||
19 | plugins.push( | 20 | plugins.push( |
20 | new PrerenderSPAPlugin({ | 21 | new PrerenderSPAPlugin({ |
21 | staticDir: path.join(__dirname, 'dist'), | 22 | staticDir: path.join(__dirname, webpack_public_path || 'dist'), // 如果没配置环境目录(生产),则写到目录dist |
22 | routes: ['/', '/demo', '/about'], | 23 | routes: ['/', '/demo', '/about'], |
23 | renderer: new Renderer({ | 24 | renderer: new Renderer({ |
24 | inject: { | 25 | inject: { | ... | ... |
-
Please register or sign in to post a comment