webpack-require-loader
webpack-require-loader copied to clipboard
Extra import
In my stylus file I have next line:
// @require "./**/!(_index).styl";
Issue is that all stylus files were imported three times in a row.
In source files there is such code:
//...
var regJS = /\s*\/\/\s*@(require|require-loader)*\s+(["'](.*)["']).*/mg;
var regCSS = /\s*@(require|require-loader)*\s+(["'](.*)["']).*/mg;
//...
while ((url = regJS.exec(source)) !== null || (url = regCSS.exec(source)) !== null) {
//...
-
while
expression was hard to debug. -
regCSS
is a part ofregJS
and difference is only "//" slashes in the start of JS expression
It can be fixed via replacement of // @require
with @require-loader
But it was confusing, do you need that regJS
expression?
Hi, @apastuhov Thank you for your issue.
I'll see next week what's there and how. I have not opened this repository for a long time, I did not think that someone is using it)
If you have any suggestions how to do better and time to do it, open pull request, I'll look with pleasure.
If it's okay, we'll merge it and publish in npm.