From 8b9918ac7bfd87cfa8ccc2af0364fe3c332eead5 Mon Sep 17 00:00:00 2001 From: Anton Karmazin Date: Tue, 10 Oct 2017 17:44:57 +0300 Subject: [PATCH] Fix eslint-loader usage on production So as `eslint-loader` placed to `devDependencies` it causes an error like: ``` ERROR in Entry module not found: Error: Can't resolve 'eslint-loader' in ... ``` --- template/nuxt.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/nuxt.config.js b/template/nuxt.config.js index 59cca8f..b8dba28 100644 --- a/template/nuxt.config.js +++ b/template/nuxt.config.js @@ -26,7 +26,7 @@ module.exports = { ** Run ESLINT on save */ extend (config, ctx) { - if (ctx.isClient) { + if (ctx.dev && ctx.isClient) { config.module.rules.push({ enforce: 'pre', test: /\.(js|vue)$/,