-
Notifications
You must be signed in to change notification settings - Fork 214
No/Incomplete CSS sourcemaps generated when building #1051
Comments
After some more investigation I managed to get the
The next problem however is that the generated sourcemap only references and points to the combined final |
Hi! Neutrino 8 (the latest version published to NPM) uses webpack 3 and so extract-text-webpack-plugin for CSS extraction. (The upcoming Neutrino 9 on Looking at the /* neutrino.config.module.rule('style-modules') */
{
test: /\.(module.css)$/,
use: [
/* neutrino.config.module.rule('style-modules').use('hot-modules') */
{
loader: 'C:\\Users\\Ed\\src\\test-n8\\node_modules\\css-hot-loader\\index.js'
},
/* neutrino.config.module.rule('style-modules').use('C:\Users\Ed\src\test-n8\node_modules\extract-text-webpack-plugin\dist\loader.js') */
{
loader: 'C:\\Users\\Ed\\src\\test-n8\\node_modules\\extract-text-webpack-plugin\\dist\\loader.js',
options: {
omit: 1,
remove: true
}
},
/* neutrino.config.module.rule('style-modules').use('C:\Users\Ed\src\test-n8\node_modules\style-loader\index.js') */
{
loader: 'C:\\Users\\Ed\\src\\test-n8\\node_modules\\style-loader\\index.js'
},
/* neutrino.config.module.rule('style-modules').use('C:\Users\Ed\src\test-n8\node_modules\css-loader\index.js') */
{
loader: 'C:\\Users\\Ed\\src\\test-n8\\node_modules\\css-loader\\index.js',
options: {
importLoaders: 0,
sourceMap: true,
modules: true
}
}
]
}, The configuration isn't being correctly generated here: On neutrino/packages/style-loader/index.js Lines 50 to 78 in 985e179
Testing a project locally using Neutrino If someone has a chance to open a PR against Neutrino 8, we'd probably accept it - but perhaps the best option is for us to double down on getting an alpha/beta of Neutrino 9 out, which fixes this and a lot more (plus gives up to 5x faster build times etc). |
I can confirm that this now works flawlessly by just specifying the devtool option on the new beta. Thanks for the great work! |
I just reproduced an issue I'm having with a more complex Neutrino (latest version) project, by creating a completely new
@neutrinojs/react
project, and trying some small modifications to the.neutrinorc
file.During project set up I enabled Jest and Airbnb linting.
The objective in the end is to have sourcemaps for both JS and CSS in the
build
folder.The sample modified
.neutrinorc
looks as follows:If I then try to build the project, the
build
folder will correctly contain.js.map
files for the.js
files, however, no.css.map
file for the relative.css
file is generated.I couldn't find any other documentation around mentioning the best way to achieve this, is this actually supposed to work via some other config option or it's not available at the moment?
This seem to be related to the internally used
mini-css-extract-plugin
, but I couldn't find any working option to pass toextract
to make it work correctly.The text was updated successfully, but these errors were encountered: