miragejs
miragejs copied to clipboard
Auto-reloading not working with webpack-dev-server
When importing miragejs into my webpack project, the auto-reloading functionality of webpack-dev-server seems to break.
Not exactly sure what's causing this, but I solved it by using dynamic imports for the miragejs module.
const { createServer, Model } = await import("miragejs");
The above is added somewhere inside my application so that webpack-dev-server can perform all the necessary setup before miragejs starts up