Answer the question
In order to leave comments, you need to log in
How to render entire folder with styles in webpack?
I have a folder with all styles, but they are written in .sass. How to use webpack to select several files or all, but without using entry , because then the styles are duplicated in .js. Used include , but didn't help.
{
test: /\.(sa|sc|c)ss$/,
include: path.resolve(__dirname, '../src/sass'),
use: [
MiniCssExtractPlugin.loader,
'css-loader',
'sass-loader',
],
}
Answer the question
In order to leave comments, you need to log in
https://webpack.js.org/guides/dependency-management...
(require => r.keys().forEach(require))(require.context('./sass/', false, /\.(sa|sc|c)ss$/));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question