mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-24 02:27:37 +00:00
Separate webackconfig for prod
This commit is contained in:
parent
bc1ffb29c3
commit
a5cbc6f848
3 changed files with 15 additions and 10 deletions
|
|
@ -5,7 +5,7 @@
|
|||
"main": "index.html",
|
||||
"scripts": {
|
||||
"lint": "eslint js/*.js js/*.jsx",
|
||||
"build": "webpack --optimize-minimize",
|
||||
"build": "webpack --config=webpack.production.config.js",
|
||||
"serve": "webpack-dev-server",
|
||||
"weight": "npm run build && gzip-size built/winamp.js | pretty-bytes",
|
||||
"test": "jest && npm run lint",
|
||||
|
|
|
|||
|
|
@ -1,14 +1,6 @@
|
|||
var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
'NODE_ENV': JSON.stringify('production')
|
||||
}
|
||||
})
|
||||
],
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
|
|
|
|||
13
webpack.production.config.js
Normal file
13
webpack.production.config.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
const config = require('./webpack.config');
|
||||
const webpack = require('webpack');
|
||||
|
||||
config.plugins = (config.plugins || []).concat([
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
'NODE_ENV': JSON.stringify('production')
|
||||
}
|
||||
}),
|
||||
new webpack.optimize.UglifyJsPlugin()
|
||||
]);
|
||||
|
||||
module.exports = config;
|
||||
Loading…
Add table
Add a link
Reference in a new issue