You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i.e. linting should error out if you have console.log in your app.
Edit src/main.ts and add a console.log statement:
...
console.log("Here we go!");createApp(App).use(store).use(router).mount("#app");
What is expected?
The second time the build is run, it should have failed.
The conditions are the same as the first run, and the console.log "error" is still present, so it should have failed.
What is actually happening?
The first time you run a build, it fails as expected.
But subsequent runs build, when they should fail.
NOTE: If you save src/main.js and build again, then the build fails.
We need to be able to rely on the build failing if the project has errors.
If this is indeed a bug, and not a user error, then I would consider it a serious problem as it would be bad to successfully build when the project has errors.
The text was updated successfully, but these errors were encountered:
Problem is still there. Even after updating all vue-cli project dependencies. Running vue-cli-service lint --no-fix && vue-cli-service serve helps, but this is not the most performant way, since it is running the linter twice now.
Version
4.5.9
Reproduction link
https://github.com/robinzimmermann/vue-build-issue-1
Environment info
Steps to reproduce
Check out the repo the reproduces: https://github.com/robinzimmermann/vue-build-issue-1
From the command line, build for production:
The build fails, as expected.
Now immediately run the command again:
The build succeeds, and no error is reported.
FYI That repo was just a basic creation using vue-cli with the following modifications:
Create a new project:
Here are the options I chose (from my
~/.vuerc
file):Edit
.eslintrc.js
, in therules
section, change:to:
i.e. linting should error out if you have
console.log
in your app.Edit
src/main.ts
and add aconsole.log
statement:What is expected?
The second time the build is run, it should have failed.
The conditions are the same as the first run, and the console.log "error" is still present, so it should have failed.
What is actually happening?
The first time you run a build, it fails as expected.
But subsequent runs build, when they should fail.
NOTE: If you save
src/main.js
and build again, then the build fails.We need to be able to rely on the build failing if the project has errors.
If this is indeed a bug, and not a user error, then I would consider it a serious problem as it would be bad to successfully build when the project has errors.
The text was updated successfully, but these errors were encountered: