Closed Rush-YL closed 6 years ago
This issue as been imported as question since it does not respect starter-template issue template. Only bug reports and feature requests stays open to reduce maintainers workload. If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically. Your question is available at https://cmty.app/nuxt/starter-template/issues/c57.
10/23/18 Edit: the comment below is incorrect - apologies for misleading anyone!
~@Rush-YL~
~Remove ctx.isClient
and replace with process.client
in nuxt-config.js
:~
extend (config, { isDev }) {
if (isDev && process.client) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
}
@aeksco This is incorrect and process.client
will be undefined.
this issue is fixed by the following PR: https://github.com/nuxt-community/starter-template/pull/86
please, don't apply the @aeksco's proposal !
@XanderLuciano @NicoPennec Apologies for the misleading comment - I've updated my post directing people not to follow those instructions. Thanks for posting about the fix :)
Module build failed (from ./node_mdules/eslint-loader/index.js): TypeError: Cannot read property 'eslint' of undefined at Object.module.exports