Commit d2199f3e by 万亚飞

fix bug

parent 328bd47c
...@@ -8,8 +8,8 @@ const CleanWebpackPlugin = require('clean-webpack-plugin'); ...@@ -8,8 +8,8 @@ const CleanWebpackPlugin = require('clean-webpack-plugin');
const OptimizeCssAssetsWebpackPlugin = require('optimize-css-assets-webpack-plugin'); const OptimizeCssAssetsWebpackPlugin = require('optimize-css-assets-webpack-plugin');
const PrerenderSPAPlugin = require('prerender-spa-plugin'); const PrerenderSPAPlugin = require('prerender-spa-plugin');
const PreloadWebpackPlugin = require('preload-webpack-plugin'); const PreloadWebpackPlugin = require('preload-webpack-plugin');
const env = require(`./${process.env.NODE_ENV}.env`); const env = require(`./${process.env.ENV_MARK}.env`);
console.log('env', process.env.NODE_ENV, env); console.log('env', process.env.ENV_MARK, env);
const os = require('os'); const os = require('os');
function resolveRoot(dir) { function resolveRoot(dir) {
......
...@@ -79,13 +79,13 @@ ...@@ -79,13 +79,13 @@
"build:test": { "build:test": {
"command": "webpack --config ./config/webpack.prod.js", "command": "webpack --config ./config/webpack.prod.js",
"env": { "env": {
"NODE_ENV": "testing" "ENV_MARK": "testing"
} }
}, },
"build:prod": { "build:prod": {
"command": "webpack --config ./config/webpack.prod.js", "command": "webpack --config ./config/webpack.prod.js",
"env": { "env": {
"NODE_ENV": "production" "ENV_MARK": "production"
} }
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment