Commit f2a0f9a8 authored by Mike Greiling's avatar Mike Greiling

upgrade to vue-loader 15.0.11 and update webpack config

parent c3a4f443
...@@ -2,6 +2,7 @@ const fs = require('fs'); ...@@ -2,6 +2,7 @@ const fs = require('fs');
const path = require('path'); const path = require('path');
const glob = require('glob'); const glob = require('glob');
const webpack = require('webpack'); const webpack = require('webpack');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin; const StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin;
const CopyWebpackPlugin = require('copy-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin'); const CompressionPlugin = require('compression-webpack-plugin');
...@@ -107,7 +108,7 @@ const config = { ...@@ -107,7 +108,7 @@ const config = {
rules: [ rules: [
{ {
test: /\.js$/, test: /\.js$/,
exclude: /(node_modules|vendor\/assets)/, exclude: path => /node_modules|vendor[\\/]assets/.test(path) && !/\.vue\.js/.test(path),
loader: 'babel-loader', loader: 'babel-loader',
options: { options: {
cacheDirectory: path.join(ROOT_PATH, 'tmp/cache/babel-loader'), cacheDirectory: path.join(ROOT_PATH, 'tmp/cache/babel-loader'),
...@@ -147,10 +148,9 @@ const config = { ...@@ -147,10 +148,9 @@ const config = {
}, },
}, },
{ {
test: /katex.min.css$/, test: /.css$/,
include: /node_modules\/katex\/dist/,
use: [ use: [
{ loader: 'style-loader' }, 'vue-style-loader',
{ {
loader: 'css-loader', loader: 'css-loader',
options: { options: {
...@@ -197,6 +197,9 @@ const config = { ...@@ -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 // prevent pikaday from including moment.js
new webpack.IgnorePlugin(/moment/, /pikaday/), new webpack.IgnorePlugin(/moment/, /pikaday/),
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment