Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code is still uploaded, even on loader error #31

Open
bryanbecker opened this issue Jun 4, 2017 · 3 comments
Open

Code is still uploaded, even on loader error #31

bryanbecker opened this issue Jun 4, 2017 · 3 comments

Comments

@bryanbecker
Copy link
Contributor

See screepers/screeps-typescript-starter#49

I'm not sure if the issue is here or not, but it looks like it can be handled here.

Using webpack NoEmitOnErrorsPlugin can have webpack skip the emit.

Is it possible to have the screeps plugin abort if there is an error (or upload during the emit stage)?

@bryanbecker
Copy link
Contributor Author

--bail commandline option will stop webpack hard on an error, but doesn't play nice with watch mode.

Maybe some discussion on which way to handle this error will be useful, since everything involves some tradeoffs

@langri-sha
Copy link
Owner

Would definitely make sense to provide an option to skip uploads when a compilation has errors. Not sure if this should be the default behavior, if others would like to upload in spite of ESLint errors or something.

In either case, when this behavior kicks in it would be nice to log a warning that nothing was uploaded (in which case I hope the user will have an error printed they can inspect for the reason why).

@bryanbecker
Copy link
Contributor Author

I'm not that well versed in webpack plugins, but I think they hook into the various events/stages to run, correct?

Would it be possible/practical to have the screeps-webpack-plugin run on the emit stage instead of the compile stage (browsing through the source, it looks like it runs on the compile stage)?

This way the built-in NoEmitOnErrors can take over, and we can customize the exact rules based on build environment

Another possible option is to make the screep-webpack-plugin itself configurable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants