🚀 Enhancements
-
#481 Mark Mirage as tree-shakable via sideEffects key.
Prior to this change, Webpack (in common tools like Create React App + Vue CLI) would not tree-shake Mirage from production builds, since Mirage does indeed have side effects. However, these side effects are only relevant during development, and should not prevent Mirage from being tree-shaken from production builds.
The
sideEffects
key is an escape hatch and can be used to tell Webpack exactly this. With this change, apps with modern build setups that use Mirage like thisimport { Server } from 'miragejs' if (process.env.NODE_ENV !== 'production') { new Server() }
should get all of
miragejs
automatically tree-shaken from their production builds!
🏠 Internal
- Dependency updates