![]() Source map generation is really slow on io.js. If you have a better idea, please open a PR :) It's a terrible hack to jump back onto the React Native runloop when a module is changed. ![]() Why is hot reload using a no-op setInterval() in my app? I get the red box of death when using hot reload even after fixing the exception. You may need to whitelist these modules in your webpack config, as the default configuration in the example excludes all of node_modules. Most react-native 3rd party modules are published to npm in ES6+ since the react-native packager handles transpiling. I can't import 3rd party modules in my project. If you regurlarly use this feature, you might want to default to the web socket executor in development:Ĭlass executorClass = _executorClass ?: _globalExecutorClass ?: NOTE: hot reload currently only works with the Chrome web socket executor (hit CMD+D in the simulator). To enable hot reload, make sure you first install babel-plugin-react-transform and react-transform-hmr, then start the server with -hot. Since this is built on Webpack you can now leverage the growing ecosystem of addons such as React hot module replacement via react-transform-hmr. Note: HMR currently does not work using React Native >=0.12. React Native Webpack Server enables source maps by generating the react-native and application bundles separately and then combining their source maps. ![]() This is done for speed, but it also means you can only use transforms that map lines 1 to 1. This is because the Webpack bundle is first built and then passed off to the React Packager which constructs the source map by hand. Source MapsĬurrent solutions for building React Native bundles with Webpack lose source maps. See the BabelES6 webpack config for an example. The sample apps are configured to enable minification when _ENV is set to production. In your webpack config, you will likely want to enable the UglifyJsPlugin.
0 Comments
Leave a Reply. |