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,6 +131,7 @@ const config = { ...@@ -126,6 +131,7 @@ const config = {
oneOf: [ oneOf: [
{ {
issuer: /\.vue$/, issuer: /\.vue$/,
use: [{
loader: 'vue-svg-loader', loader: 'vue-svg-loader',
options: { options: {
svgo: { svgo: {
...@@ -134,23 +140,28 @@ const config = { ...@@ -134,23 +140,28 @@ const config = {
] ]
} }
}, },
}]
}, },
{ {
use: [{
loader: 'url-loader', loader: 'url-loader',
options: { options: {
limit: 1000, limit: 1000,
name: 'assets/img/[name].[ext]' name: 'assets/img/[name].[ext]'
} }
}]
} }
] ]
}, },
{ {
test: /\.(png|jpg|jpeg|gif|eot|ttf|woff|woff2)(\?.+)?$/, test: /\.(png|jpg|jpeg|gif|eot|ttf|woff|woff2)(\?.+)?$/,
use: [{
loader: 'url-loader', loader: 'url-loader',
options: { options: {
limit: 1000, limit: 1000,
name: 'assets/img/[name].[ext]' 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