diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-02-08 15:24:08 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-02-09 10:52:19 -0600 |
commit | 6dd90100bde153a62998f8db2204e4f59bca7940 (patch) | |
tree | 0da3e036e68f088ba38ccd45b44ffde2562836be | |
parent | 0a36693c92ce5ced61b68d2cb0d91694076d5d28 (diff) | |
download | gitlab-ce-6dd90100bde153a62998f8db2204e4f59bca7940.tar.gz |
upgrade to webpack 2.2.x
-rw-r--r-- | config/webpack.config.js | 27 | ||||
-rw-r--r-- | package.json | 8 |
2 files changed, 17 insertions, 18 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index 2d1a16a18dd..00f448c1fbb 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -48,24 +48,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' } ] }, @@ -86,7 +85,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', @@ -102,14 +101,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() + }) ); } diff --git a/package.json b/package.json index 7f1c8dd6fff..a012c49a72d 100644 --- a/package.json +++ b/package.json @@ -19,21 +19,19 @@ "compression-webpack-plugin": "^0.3.2", "d3": "3.5.11", "dropzone": "4.2.0", - "exports-loader": "^0.6.3", "imports-loader": "^0.6.5", "jquery": "2.2.1", "jquery-ui": "github:jquery/jquery-ui#1.11.4", "jquery-ujs": "1.2.1", - "json-loader": "^0.5.4", "mousetrap": "1.4.6", "pikaday": "^1.5.1", "select2": "3.5.2-browserify", - "stats-webpack-plugin": "^0.4.2", + "stats-webpack-plugin": "^0.4.3", "underscore": "1.8.3", "vue": "2.0.3", "vue-resource": "0.9.3", - "webpack": "^1.14.0", - "webpack-dev-server": "^1.16.2" + "webpack": "^2.2.1", + "webpack-dev-server": "^2.3.0" }, "devDependencies": { "eslint": "^3.10.1", |