diff options
author | Mike Greiling <mike@pixelcog.com> | 2016-10-28 03:22:02 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-01-06 10:21:02 -0600 |
commit | 55f291e8ceae6d3d432039f72f6935c62fb2a872 (patch) | |
tree | 0251e33d29241731ad16ae8a9681fa0863782840 /config/webpack.config.js | |
parent | 31bd36845ba1c18404f029f85b6a0f841c1c390c (diff) | |
download | gitlab-ce-55f291e8ceae6d3d432039f72f6935c62fb2a872.tar.gz |
replace application.js sprockets output with webpack-generated equivalent
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r-- | config/webpack.config.js | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index acd5597da3a..d45638fbcbd 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -14,7 +14,7 @@ var DEV_SERVER_PORT = 3808; var config = { context: ROOT_PATH, entry: { - bundle: './app/assets/javascripts/webpack/bundle.js' + application: './app/assets/javascripts/webpack/application.js' }, output: { @@ -31,6 +31,15 @@ var config = { test: /\.es6$/, exclude: /node_modules/, loader: 'babel-loader' + }, + { + test: /\.(js|es6)$/, + loader: 'imports-loader', + query: 'this=>window' + }, + { + test: /\.json$/, + loader: 'json-loader' } ] }, @@ -48,7 +57,14 @@ var config = { ], resolve: { - extensions: ['', '.js', '.es6', '.js.es6'] + extensions: ['', '.js', '.es6', '.js.es6'], + alias: { + 'bootstrap/js': 'bootstrap-sass/assets/javascripts/bootstrap', + 'emoji-aliases$': path.join(ROOT_PATH, 'fixtures/emojis/aliases.json'), + 'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'), + 'vue$': 'vue/dist/vue.js', + 'vue-resource$': 'vue-resource/dist/vue-resource.js' + } } } |