summaryrefslogtreecommitdiff
path: root/config/webpack.config.js
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-05-18 17:38:52 -0500
committerMike Greiling <mike@pixelcog.com>2018-05-18 18:23:44 -0500
commitf2a0f9a8dd27ca53acf306947c1a7d64de619df4 (patch)
treef4985c6e8146225d33c0d1bacdf55d9fe85105db /config/webpack.config.js
parentc3a4f443cc116f15b578f3d39565583deda679dd (diff)
downloadgitlab-ce-f2a0f9a8dd27ca53acf306947c1a7d64de619df4.tar.gz
upgrade to vue-loader 15.0.11 and update webpack config
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r--config/webpack.config.js11
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/),