npm install --save-dev import-glob-loader2
@import "foo/**/*";
Expands into
@import "foo/1.scss";
@import "foo/bar/2.scss";
@import "foo/bar/3.scss";
// Webpack 2:
module: {
rules: [
{
test: /\.scss/,
enforce: "pre",
loader: "import-glob-loader2"
},
// ...
]
}
// Webpack 1:
{
module: {
preLoaders: [{
test: /\.scss/,
loader: 'import-glob-loader2'
}]
}
}
test = 'import'
The test for globbing to be applied. Lines matchingtest
will be expanded. (This is a word-boundary test, soimport
will match@import
but notimportScript
, for example)delimiter = '\n'
The delimiter used to join expanded globs.
M.Saad Siddiqui |