Closed kirill-konshin closed 7 years ago
nwb uses ExtractTextPlugin
to extract CSS in builds.
According to these issues you can't extract usable styles:
If you need to disable use of ExtractTextPlugin
in builds, I could add setting webpack.extractText
config to false
as a way of disabling it.
you can't extract usable styles
Totally makes sense
Previously it used to work w/o extra config... but if you can add a way of disabling this, please go ahead.
I think that webpack.extractText: false|null
should be just enough: a strict check that if it's defined and is falsy
then disable the plugin, but undefined
will just use default config.
If it used to work and the stylesheet was in a split chunk you could try webpack.extractText = {allChunks: false}
config - the default was changed to true
a while back to avoid pulling the style-loader runtime into every build.
Yep, that's the case, it is working with allChunks: false
. That's a very bad change, it's backward incompatible... I understand the rationale, but still...
In any case, I hope to see a setting to completely disable the extract text plugin because for useable styles case it is useless.
What will be the ETA of change?
Fix confirmed.
This issue is a:
NWB version is 0.18.6.
If NWB is used with useable styles loader it works well in dev mode but throws an error if build is served.
Setup:
nwb.config.js
src/index.js
src/index.scss
Steps to reproduce:
index.js:6 Uncaught TypeError: t.n(...).a.use is not a function