Skip to content

Commit

Permalink
feat: don't throw on console/debugger statements for vue serve (vue…
Browse files Browse the repository at this point in the history
…js#5029)

1. they're useful in development
2. to be in line with the default preset
  • Loading branch information
sodatea authored and mactanxin committed Feb 11, 2020
1 parent 5041fbf commit dc497c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/@vue/cli-service-global/lib/globalConfigPlugin.js
Expand Up @@ -112,6 +112,10 @@ module.exports = function createConfigPlugin (context, entry, asLib) {
],
parserOptions: {
parser: 'babel-eslint'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': `process.env.NODE_ENV === 'production' ? 'error' : 'off'`
}
}
}))
Expand Down

0 comments on commit dc497c9

Please sign in to comment.