docz-plugin-css (0.11.0) make docz (1.0.1) crash :(

yarn add style-loader css-loader sass-loader node-sass
Replace the docz-plugin-css call in your doczrc.js with:
export default {
// ...
onCreateWebpackChain: (config) => {
// Allow SCSS imports
config.module
.rule('scss')
.test(/\.css|scss|sass$/)
.use('style')
.loader('style-loader')
.end()
.use('css')
.loader('css-loader')
.end()
.use('sass')
.loader('sass-loader')
.end();
},
// ...
};
yarn add style-loader css-loader
Replace the docz-plugin-css call in your doczrc.js with:
export default {
// ...
onCreateWebpackChain: (config) => {
// Allow CSS imports
config.module
.rule('scss')
.test(/\.css|scss|sass$/)
.use('style')
.loader('style-loader')
.end()
.use('css')
.loader('css-loader')
.end();
},
// ...
};
@ivan-dalmet
It crashed only when you add docz-plugin-css?
I had the same problem with 'expirationTime' when updated docz to 1.0.1, exactly with hooks and react-hot-loader, and it fixed by update 'react-hot-loader' to 4.8
more: https://github.com/facebook/react/issues/14767
mby it help
Yes only docz-plugin-css. May be it use react-hot-loader.
It does not, but it depends on docz-core which does rely on react-hot-loader, and has not been updated to the latest version in docz-plugin-css
I was able to resolve this by adding the latest version of react-hot-loader as a dev dependency to my docz project. Didn't have to remove the CSS plugin
$ yarn add react-hot-loader@latest --dev
It does not, but it depends on
docz-corewhich does rely onreact-hot-loader, and has not been updated to the latest version indocz-plugin-cssI was able to resolve this by adding the latest version of
react-hot-loaderas a dev dependency to my docz project. Didn't have to remove the CSS plugin$ yarn add react-hot-loader@latest --dev
Works for me here, in Ingresse's Aphrodite React.
(Under reconstruction)
Thank you, @mrmos
Most helpful comment
It does not, but it depends on
docz-corewhich does rely onreact-hot-loader, and has not been updated to the latest version indocz-plugin-cssI was able to resolve this by adding the latest version of
react-hot-loaderas a dev dependency to my docz project. Didn't have to remove the CSS plugin