static/package.json
@@ -5,8 +5,8 @@ |
"module": "index.js", |
"license": "MIT", |
"scripts": { |
- "dev": "webpack --mode development --progress --config webpack.dev.js --watch", |
- "build": "webpack --progress --config webpack.prod.js" |
+ "dev": "webpack --progress --config webpack.dev.js --watch", |
+ "build": "webpack --config webpack.prod.js" |
}, |
"resolve": { |
"mainFields": [ |
static/webpack.common.js
@@ -75,6 +75,9 @@ |
PRODUCTION: JSON.stringify(!debug), |
APP_VERSION: JSON.stringify(version), |
}), |
+ new webpack.ProvidePlugin({ |
+ process: 'process/browser', |
+ }), |
], |
resolve: { |
alias: { |
static/webpack.prod.js
@@ -1,9 +1,10 @@ |
/* eslint-disable */ |
const common = require('./webpack.common.js') |
const merge = require('webpack-merge') |
-const webpack = require('webpack') |
+ |
+// in build if you get out of memory errors try |
+// node --max_old_space_size=4096 ./node_modules/webpack/bin/webpack.js --progress --config webpack.prod.js |
|
module.exports = merge(common, { |
mode: 'production', |
- plugins: [], |
}) |