-
Notifications
You must be signed in to change notification settings - Fork 78
Storybooks isn't reloading the view via HMR #555
Comments
I updated storybooks to 3.0.0 and don't see HMR changes to our views inside storybooks. The same type of changes work fine inside the app. |
Look a look at the default settings inside storybooks-rn: https://github.com/storybooks/storybook/blob/master/app/react-native/src/server/config/webpack.config.js Changing out config to const path = require('path')
const webpack = require('webpack')
const { OccurenceOrderPlugin, includePaths, excludePaths } = require('@storybook/react-native/dist/server/config/utils')
module.exports = {
devtool: "#inline-source-map", // Otherwise getting errors about e.g. `Relay` not being defined.
resolve: {
extensions: [".js", ".jsx", ".ts", ".tsx"],
},
module: {
loaders: [
{
test: /\.tsx?$/,
exclude: /node_modules/,
loaders: ["awesome-typescript-loader?configFileName=./tsconfig.json&silent=true&transpileOnly=true&target=es6&useBabel=true&useCache=true"],
},
],
},
plugins: [
new OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
],
} Didn't help - think that might only work for the server anyway. |
#562 could help a bit here |
This works for maxim 🌊 |
We discovered that live reloading works for maxim, not HMR |
This works for me, in storybooks, on the Welcome page when I make changes to the text |
Got it - a PureComponent does not get HMR |
Sigh. Are there docs for that? |
Ok. Alas that doesn’t really tell me much more about the details :/ |
This is done in #611. |
gaearon/babel-plugin-react-transform#106 should actively fix this vs our workaround |
You can't press save and see the changes, you'd need to change between different stories. The HMRer is definitely doing it's work, you can see the notification - it's just that the storybook's content doesn't get updated.
Storybooks 3.0 is coming out soon, perhaps we can try that if a simple
yarn upgrade [storybooks]
doesn't helpThe text was updated successfully, but these errors were encountered: