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

When resolve.sync fails the catch clause prevents any custom importer from running #58

Closed
kentaromiura opened this issue Nov 28, 2018 · 1 comment

Comments

@kentaromiura
Copy link

https://github.com/differui/rollup-plugin-sass/blob/e94b639f895563b9f78bb53c21695ce02fe0a56a/src/index.js#L69-L73
this logic prevents any custom importer from running, a better way is to return null in case customizedSassOptions.importer is defined to allow it/them to run.

To reproduce just try to import with any custom path format that will not correctly resolve for example a path with a variable like:

@import '~test/${theme}/utils';

it will fail and notice that even after adding

options: {
        importer: [
          function(url, prev, done) {
            console.log('this will never run...');
          }
        ],
       // ...
}

The custom importer doesn't run (while it does after returning null).

@differui
Copy link
Collaborator

Please retry the latest version 0.9.3 the bug shoud be fixed. Have a nice day :)

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