🔧 ESLint run on save hot reload

This commit is contained in:
Kevin van der Werff
2019-10-01 14:19:28 +02:00
parent 0e49dc795d
commit 6a2e1a58d5

View File

@@ -32,6 +32,22 @@ export default {
routes: resources.map(category => category.slug) routes: resources.map(category => category.slug)
}, },
/**
* Configure ESLint to run on save with hot reloading
*/
build: {
extend(config, ctx) {
if (ctx.isDev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
}
},
/* /*
** Customize the progress-bar color ** Customize the progress-bar color
*/ */