diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-05-18 17:38:52 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-05-18 18:23:44 -0500 |
commit | f2a0f9a8dd27ca53acf306947c1a7d64de619df4 (patch) | |
tree | f4985c6e8146225d33c0d1bacdf55d9fe85105db /config | |
parent | c3a4f443cc116f15b578f3d39565583deda679dd (diff) | |
download | gitlab-ce-f2a0f9a8dd27ca53acf306947c1a7d64de619df4.tar.gz |
upgrade to vue-loader 15.0.11 and update webpack config
Diffstat (limited to 'config')
-rw-r--r-- | config/webpack.config.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index 5096f35e808..ff7189bd708 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -2,6 +2,7 @@ const fs = require('fs'); const path = require('path'); const glob = require('glob'); const webpack = require('webpack'); +const VueLoaderPlugin = require('vue-loader/lib/plugin'); const StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin; const CopyWebpackPlugin = require('copy-webpack-plugin'); const CompressionPlugin = require('compression-webpack-plugin'); @@ -107,7 +108,7 @@ const config = { rules: [ { test: /\.js$/, - exclude: /(node_modules|vendor\/assets)/, + exclude: path => /node_modules|vendor[\\/]assets/.test(path) && !/\.vue\.js/.test(path), loader: 'babel-loader', options: { cacheDirectory: path.join(ROOT_PATH, 'tmp/cache/babel-loader'), @@ -147,10 +148,9 @@ const config = { }, }, { - test: /katex.min.css$/, - include: /node_modules\/katex\/dist/, + test: /.css$/, use: [ - { loader: 'style-loader' }, + 'vue-style-loader', { loader: 'css-loader', options: { @@ -197,6 +197,9 @@ const config = { }, }), + // enable vue-loader to use existing loader rules for other module types + new VueLoaderPlugin(), + // prevent pikaday from including moment.js new webpack.IgnorePlugin(/moment/, /pikaday/), |