Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra import #11

Open
apastuhov opened this issue Apr 16, 2018 · 1 comment
Open

Extra import #11

apastuhov opened this issue Apr 16, 2018 · 1 comment

Comments

@apastuhov
Copy link
Contributor

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) {
//...
  1. while expression was hard to debug.
  2. regCSS is a part of regJS 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?

@shanhaichik
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants