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

How ignored modules shall behave when imported from outside #3

Open
yurydelendik opened this issue Apr 12, 2016 · 0 comments
Open

How ignored modules shall behave when imported from outside #3

yurydelendik opened this issue Apr 12, 2016 · 0 comments

Comments

@yurydelendik
Copy link

Spec says:

You can simply prevent a module or file from being loaded into a bundle by specifying a 
value of false for any of the keys. This is useful if you know certain codepaths will not
 be executed client side but find it awkward to split up or change the code structure.

If I want to disable e.g. some local module "./server/only.js" inside package "sample". The sample/package.json fragment will contain:

"browser": {
    "./server/only.js": false
}

However what if I decide to this module from the external package, e.g. an external package code has:

var only = require("sample/server/only");

Shall the packager replace the only with empty module in both places or only inside of the "sample"?

@yurydelendik yurydelendik changed the title How ignored modules shall behave when exported from outside How ignored modules shall behave when imported from outside Apr 12, 2016
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

1 participant