miragejs icon indicating copy to clipboard operation
miragejs copied to clipboard

Auto-reloading not working with webpack-dev-server

Open yaakov123 opened this issue 3 years ago • 1 comments

When importing miragejs into my webpack project, the auto-reloading functionality of webpack-dev-server seems to break.

yaakov123 avatar Mar 11 '21 07:03 yaakov123

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

yaakov123 avatar Mar 11 '21 08:03 yaakov123