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

Help with errored bundles #76

Open
glenjamin opened this issue Feb 29, 2016 · 1 comment
Open

Help with errored bundles #76

glenjamin opened this issue Feb 29, 2016 · 1 comment

Comments

@glenjamin
Copy link
Collaborator

After a chat with @gaearon today, we came up with a nicer way to handle invalid bundles.

When using the NoErrors plugin with hot middleware, we don't reload on broken builds - but a fresh request will serve up a stale bundle.

We can pull in dev-middleware to happen inside this middleware, and then conditionally send a different bundle when in an error state.

This will also simplify things slightly for consumers - they'll only need to include one middleware.

TBC: what dependency should be added to package.json? I think peerDependency on webpack-dev-middleware makes the most sense

@glenjamin
Copy link
Collaborator Author

Some wip at https://github.com/glenjamin/webpack-hot-middleware/tree/serve-valid-bundles

The basic idea is there, but I need a good way of identifying whether the file we're about to serve is a bundle - so we can tell when to replace it.

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

No branches or pull requests

1 participant