Commit 52da628a authored by Alfredo Sumaran's avatar Alfredo Sumaran

Merge branch 'upgrade-webpack-v2.2-ee' into 'master'

Port "Upgrade to webpack v2.2.1" to EE

See merge request !1203
parents 7f5db9ff e56ed662
......@@ -308,3 +308,15 @@
:why: https://github.com/substack/node-wordwrap/blob/0.0.3/LICENSE
:versions: []
:when: 2017-02-08 20:17:13.084968000 Z
- - :approve
- spdx-expression-parse
- :who: Mike Greiling
:why: https://github.com/kemitchell/spdx-expression-parse.js/blob/v1.0.4/LICENSE
:versions: []
:when: 2017-02-08 22:33:01.806977000 Z
- - :approve
- spdx-license-ids
- :who: Mike Greiling
:why: https://github.com/shinnn/spdx-license-ids/blob/v1.2.2/LICENSE
:versions: []
:when: 2017-02-08 22:35:00.225232000 Z
......@@ -49,24 +49,23 @@ var config = {
devtool: 'inline-source-map',
module: {
loaders: [
rules: [
{
test: /\.(js|es6)$/,
exclude: /(node_modules|vendor\/assets)/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'stage-2']
options: {
presets: [
["es2015", {"modules": false}],
'stage-2'
]
}
},
{
test: /\.(js|es6)$/,
exclude: /node_modules/,
loader: 'imports-loader',
query: 'this=>window'
},
{
test: /\.json$/,
loader: 'json-loader'
options: 'this=>window'
}
]
},
......@@ -87,7 +86,7 @@ var config = {
],
resolve: {
extensions: ['', '.js', '.es6', '.js.es6'],
extensions: ['.js', '.es6', '.js.es6'],
alias: {
'~': path.join(ROOT_PATH, 'app/assets/javascripts'),
'bootstrap/js': 'bootstrap-sass/assets/javascripts/bootstrap',
......@@ -103,14 +102,16 @@ if (IS_PRODUCTION) {
config.devtool = 'source-map';
config.plugins.push(
new webpack.NoErrorsPlugin(),
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false
}),
new webpack.optimize.UglifyJsPlugin({
compress: { warnings: false }
sourceMap: true
}),
new webpack.DefinePlugin({
'process.env': { NODE_ENV: JSON.stringify('production') }
}),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurrenceOrderPlugin()
})
);
}
......
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