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

Allow whitelisting of a module/subpath #2

Closed
slmgc opened this issue Apr 13, 2016 · 3 comments
Closed

Allow whitelisting of a module/subpath #2

slmgc opened this issue Apr 13, 2016 · 3 comments

Comments

@slmgc
Copy link

slmgc commented Apr 13, 2016

Hi, I have a use case:

// This module is whitelisted in a config
import 'some_module'

// This one won't be whitelisted and needs
// to be added explicitly to the whitelist
import 'some_module/subpath/to/some_file' 

Is there some way to resolve this issue?

@liady
Copy link
Owner

liady commented Apr 18, 2016

Thanks!
Do you think that adding glob/regex support to the whitelist will suffice?

@slmgc
Copy link
Author

slmgc commented Apr 19, 2016

Yeah, I think so, thank you!

@liady
Copy link
Owner

liady commented Apr 20, 2016

Added support for regex in the whitelist, so you can define:

externals: [nodeExternals({
  whitelist: [/^some_module/]
})]

And it will bundle some_module as well as all some_module/subpaths.

Let me know how that works for you.

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