-
-
Notifications
You must be signed in to change notification settings - Fork 429
Closed
Description
Hi!
I am trying to solve to prepend a @import in any loaded sass file. After I checked your docs I think this should be solved with options: { data: '@import ...' } but in my case it seems that this does not work.
// ...
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract({
loader: [
{
loader: 'css-loader',
query: {
localIdentName: '[hash:8]',
modules: true,
},
},
{
loader: 'postcss-loader',
},
{
loader: 'sass-loader',
options: {
data: `@import ${path.resolve(__dirname, 'src/both/ui/theme/_theme.scss')};`,
},
},
],
}),
},
// ...
I am using webpack 2.2 and sass-loader 6
My bundled css file does not contain the content of the _theme.scss file.
I am sorry if I am missing smth basic here because webpack and all the loader logic etc. is pretty new for me.
CodeLittlePrince
Metadata
Metadata
Assignees
Labels
No labels