Commit ea63e0a5 by Johannes Edmeier

Enable caching for eslint

parent 0628dc3a
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"watch": "cross-env NODE_ENV=development webpack --watch", "watch": "cross-env NODE_ENV=development webpack --watch",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules --bail", "build": "cross-env NODE_ENV=production webpack --bail --hide-modules",
"test": "jest", "test": "jest",
"test:watch": "jest --watch" "test:watch": "jest --watch"
}, },
......
...@@ -59,7 +59,12 @@ const config = { ...@@ -59,7 +59,12 @@ const config = {
rules: [ rules: [
{ {
test: /\.(js|vue)$/, test: /\.(js|vue)$/,
use: 'eslint-loader', use: [{
loader: 'eslint-loader',
options: {
cache: true
}
}],
enforce: 'pre' enforce: 'pre'
}, },
{ {
...@@ -86,7 +91,7 @@ const config = { ...@@ -86,7 +91,7 @@ const config = {
}, },
{ {
test: /\.js$/, test: /\.js$/,
use: 'babel-loader', use: ['babel-loader'],
include: [ include: [
resolve(__dirname, 'src/main/frontend'), resolve(__dirname, 'src/main/frontend'),
resolve(__dirname, 'node_modules/pretty-bytes') resolve(__dirname, 'node_modules/pretty-bytes')
...@@ -126,31 +131,37 @@ const config = { ...@@ -126,31 +131,37 @@ const config = {
oneOf: [ oneOf: [
{ {
issuer: /\.vue$/, issuer: /\.vue$/,
loader: 'vue-svg-loader', use: [{
options: { loader: 'vue-svg-loader',
svgo: { options: {
plugins: [ svgo: {
{inlineStyles: false} plugins: [
] {inlineStyles: false}
} ]
}, }
},
}]
}, },
{ {
loader: 'url-loader', use: [{
options: { loader: 'url-loader',
limit: 1000, options: {
name: 'assets/img/[name].[ext]' limit: 1000,
} name: 'assets/img/[name].[ext]'
}
}]
} }
] ]
}, },
{ {
test: /\.(png|jpg|jpeg|gif|eot|ttf|woff|woff2)(\?.+)?$/, test: /\.(png|jpg|jpeg|gif|eot|ttf|woff|woff2)(\?.+)?$/,
loader: 'url-loader', use: [{
options: { loader: 'url-loader',
limit: 1000, options: {
name: 'assets/img/[name].[ext]' limit: 1000,
} name: 'assets/img/[name].[ext]'
}
}]
} }
] ]
}, },
......
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