Closed smoothdvd closed 4 years ago
I think babel-eslint
is triggering before babel-plugin-transform-remove-console
and you have the no-console
rule as seen in your output.
That's throwing the error that you see which is why it might not be removed. I'm going to close this issue for now, but feel free to reopen it if have any reproducible Docker container that I can test out with what you mentioned.
Describe the bug
babel-plugin-transform-remove-console is not working in docker container
To Reproduce
Minimal code to reproduce the bug
Actual Output
ERROR Failed to compile with 5 errors1:54:17 AM
error in ./src/components/Article.vue
Module Error (from ./node_modules/eslint-loader/index.js):
/app/src/components/Article.vue 40:7 warning 'v-html' directive can lead to XSS attack vue/no-v-html 246:7 error Unexpected console statement no-console
✖ 2 problems (1 error, 1 warning)
If there is no Error thrown,
Expected Output
console.log() method should be removed when build with production env
Stack Trace
If applicable,
Configuration
How are you using babel-minify?
"@vue/cli-plugin-babel": "~4.4.0", "babel-eslint": "^10.1.0", "babel-plugin-transform-remove-console": "^6.9.4", "eslint": "^6.7.2",
babel.config.js :
.eslintrc.js:
Dockerfile:
Possible solution
Additional context