Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r--config/webpack.config.js27
1 files changed, 14 insertions, 13 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()
+ })
);
}