Skip to content

Commit ea63e0a

Browse files
committed
Enable caching for eslint
1 parent 0628dc3 commit ea63e0a

File tree

2 files changed

+32
-21
lines changed

2 files changed

+32
-21
lines changed

spring-boot-admin-server-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"watch": "cross-env NODE_ENV=development webpack --watch",
7-
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules --bail",
7+
"build": "cross-env NODE_ENV=production webpack --bail --hide-modules",
88
"test": "jest",
99
"test:watch": "jest --watch"
1010
},

spring-boot-admin-server-ui/webpack.config.js

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ const config = {
5959
rules: [
6060
{
6161
test: /\.(js|vue)$/,
62-
use: 'eslint-loader',
62+
use: [{
63+
loader: 'eslint-loader',
64+
options: {
65+
cache: true
66+
}
67+
}],
6368
enforce: 'pre'
6469
},
6570
{
@@ -86,7 +91,7 @@ const config = {
8691
},
8792
{
8893
test: /\.js$/,
89-
use: 'babel-loader',
94+
use: ['babel-loader'],
9095
include: [
9196
resolve(__dirname, 'src/main/frontend'),
9297
resolve(__dirname, 'node_modules/pretty-bytes')
@@ -126,31 +131,37 @@ const config = {
126131
oneOf: [
127132
{
128133
issuer: /\.vue$/,
129-
loader: 'vue-svg-loader',
130-
options: {
131-
svgo: {
132-
plugins: [
133-
{inlineStyles: false}
134-
]
135-
}
136-
},
134+
use: [{
135+
loader: 'vue-svg-loader',
136+
options: {
137+
svgo: {
138+
plugins: [
139+
{inlineStyles: false}
140+
]
141+
}
142+
},
143+
}]
137144
},
138145
{
139-
loader: 'url-loader',
140-
options: {
141-
limit: 1000,
142-
name: 'assets/img/[name].[ext]'
143-
}
146+
use: [{
147+
loader: 'url-loader',
148+
options: {
149+
limit: 1000,
150+
name: 'assets/img/[name].[ext]'
151+
}
152+
}]
144153
}
145154
]
146155
},
147156
{
148157
test: /\.(png|jpg|jpeg|gif|eot|ttf|woff|woff2)(\?.+)?$/,
149-
loader: 'url-loader',
150-
options: {
151-
limit: 1000,
152-
name: 'assets/img/[name].[ext]'
153-
}
158+
use: [{
159+
loader: 'url-loader',
160+
options: {
161+
limit: 1000,
162+
name: 'assets/img/[name].[ext]'
163+
}
164+
}]
154165
}
155166
]
156167
},

0 commit comments

Comments
 (0)