In the process of developing a Vue project that involves static files, I have configured the following in my package.json
for local serving:
{
...
"eslintConfig": {
...
"ignorePatterns": [
"**/vendor/*.js"
]
}
...
}
Everything works smoothly when testing locally. However, upon attempting to build the project using npm run build
, the following errors are generated:
- Building for production...
[BABEL] Note: The code generator has deoptimised the styling of /app/src/assets/vendor/fontawesome-free-5.15.3-web/js/all.min.js as it exceeds the max of 500KB.
ERROR Failed to compile with 2 errors
error in ./src/assets/vendor/bootstrap-4.6.0/bootstrap.bundle.min.js
Module Error (from ./node_modules/thread-loader/dist/cjs.js):
/app/src/assets/vendor/bootstrap-4.6.0/bootstrap.bundle.min.js
6:144 error 'define' is not defined no-undef
6:157 error 'define' is not defined no-undef
6:234 error 'globalThis' is not defined no-undef
6:723 error 'a' is a function no-func-assign
6:27968 error Empty block statement no-empty
6:36778 error Unnecessary escape character: \- no-useless-escape
6:37519 error Unnecessary escape character: \- no-useless-escape
6:68065 error 'n' is defined but never used no-unused-vars
✖ 8 problems (8 errors, 0 warnings)
Both of the errors relate to similar assets. Is there a solution to bypass these errors during the build process? It appears to be a linting-related issue.