npm miragejs 0.1.40

latest releases: 0.2.0-alpha.3, 0.2.0-alpha.2, 0.2.0-alpha.1...
4 years ago

🚀 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 this

    import { 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

Don't miss a new miragejs release

NewReleases is sending notifications on new releases.