-
Notifications
You must be signed in to change notification settings - Fork 29
Webpack 4 compatibility #37
Comments
Can you give me a tiny example code, so I can reproduce the problem. Maybe you can fork this repo, and modify the code of examples dir. |
Hi, @shepherdwind. I have tried to create a tiny repo with this issue, but it's working. I'm investigating how can I reproduce the bug of my app in the tiny repo. In my app, the first build fails, but if I change a SASS file and save it, the hot reload fix the issue and the JS error is gone. So, the error is generated in the first build, but is fixed in the hot build. Do you have any idea about the source of this issue? |
I am having the same issue. I also noticed that changing a file does recompile but the resulting styling change does not appear until after browser reload. |
👍 +1 for this. experiencing the same issue |
Can anybody provide me an example code? It is hard to find what is the problem by just some description. |
Hi @shepherdwind! I have a tiny repo where the error appears: https://github.com/navarroaxel/webpack-css-hot-bug. First, I added the |
I have removed |
This problem can fix to import
The first time webpack build, But I don't know why did this happen, I think this may have to do with the new webpack or extract-text-webpack-plugin. Now, import |
version 1.3.9 fixed this issue. Thanks to @vagusX. |
Hi @shepherdwind |
|
Works for me.
|
webpack-contrib/mini-css-extract-plugin#31 This issue fixed now, very good, I update example now. Try example css-hot-loader/examples/webpack4/webpack.config.js Lines 18 to 23 in 5a8ac39
|
Thx @shepherdwind. In my case, the fix was upgrading to |
@shepherdwind What about scss support, where I am importing the scss file to the jsx react files. |
@shepherdwind not working for my. I need to restart my server every time... module.exports = { |
@shepherdwind , should this work for SASS as well or is that still yet to be supported. I too am having trouble getting this to work. |
It works with anything. Set up your build like normal then just add the loader at the top |
If you really can't make it work, try this |
@ScriptedAlchemy , Thanks for your reply, i'll definitely check it out! |
Pay attention to if it's CSS modules or not. Both packages require an extra flag |
Full disclosure, mine is a combo of this repo and a few of my own modifications, then I rewrote part of Webpack miniCSS plugin. My work is in part, thanks to @shepherdwind |
Hi, I can't use the
css-hot-loader
withwebpack@4
because I'm getting this error message:Uncaught TypeError: Cannot read property 'call' of undefined
.This is the webpack code that is failling:
The
modules[moduleId]
isundefined
and themoduleId
value is./node_modules/css-hot-loader/hotModuleReplacement.js
.I don't know which webpack's breaking change is the cause of this error.
This is the webpack's function where this error comes:
Versions
node@6
webpack@4.1.1
css-hot-loader@1.3.8
The text was updated successfully, but these errors were encountered: