-
Notifications
You must be signed in to change notification settings - Fork 213
Question: How do I use sass-loader? #755
Comments
The react preset already comes with style-loader, so maybe it's possible there is a conflict going on here somewhere. Could you change your module.exports = {
use: [
'@neutrinojs/airbnb',
['@neutrinojs/react', {
html: {
title: 'test'
},
style: {
loaders: [
{ loader: 'sass-loader', useId: 'sass' }
]
}
}]
]
}; If that doesn't work, also try using { loader: require.resolve('sass-loader'), useId: 'sass' } Let us know! |
I tried both, but the styles.sass file didn't get compiled. module.exports = {
use: [
'@neutrinojs/airbnb',
['@neutrinojs/react', {
html: {
title: 'test'
},
style: {
loaders: [
{ loader: require.resolve('sass-loader'), useId: 'sass' }
]
}
}]
]
}; |
@timkelty Am I missing something here? |
@eliperelman @eluchsinger You need to tell
|
@eluchsinger did the approach above work for you? If so, it would be great to add a Saas example to the docs, since this came up in #803 too. |
@edmorley I think it worked, but in the end I didn't use this tool at all (therefore, I can't re-check again). |
Also came up in #871. |
Since unless the default file extension regex is overridden, the `.sass` (old style) or `.scss` (new style) Sass styles will not be seen by `sass-loader`: https://github.com/webpack-contrib/sass-loader#examples https://sass-lang.com/documentation/file.SASS_REFERENCE.html Closes #755. Closes #803. Refs #871.
To try and prevent the confusion caused when users do things like: * using `@neutrinojs/react` followed by `@neutrinojs/web`, which clobbers the React parts of the config: #1129 (comment) * using `@neutrinojs/react` followed by `@neutrinojs/style`, which causes incorrect `extract` and `hot` configuration: #1129 (comment) #755 (comment) #803 (comment) #869 (comment)
I am trying out neutrino and I have the requirement to use SASS (or SCSS). I can't get it to work. Only the App.css gets compiled and the styles.sass is ignored. I have also tried to add an include path in the sass-loader options. I don't get any error messages.
package.json:
The text was updated successfully, but these errors were encountered: