-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support name-spaced UMD module names #378
Labels
Comments
Rich-Harris
added a commit
that referenced
this issue
Dec 29, 2015
Rich-Harris
added a commit
that referenced
this issue
Dec 29, 2015
support namespaced exports (global.foo.bar.baz)
Thanks! 😄 |
Rich-Harris
added a commit
that referenced
this issue
Dec 30, 2015
Thanks for raising it! Just published a new version with this fix – 0.22.1 |
@Rich-Harris I've tried this out in 0.22.2 and it appears to be generating bad code. You can see in this example. The comma expression needs parens around it, otherwise it throws in a CommonJS or AMD environment. |
ericf
added a commit
to ericf/rollup
that referenced
this issue
Dec 30, 2015
This wraps the comma expression generated when using a namespaced global module name; e.g.: `Foo.bar`. Previously the generated code would fail in a CommonJS or AMD module environment. See: rollup#378
Merged
PR to address the above problem: #392 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd like to set the
--name
option to be something like:Foo.bar
. Rollup will accept this as input and outputGlobal.Foo.bar = ...
in the UMD module, but this will break ifFoo
isn't already defined.Browserify supports name-spaced module names by recognizing this pattern and generating code to make sure the object is defined before the member expression assignment. Something like:
It would be great if Rollup also supported this for name-spaced UMD module names.
The text was updated successfully, but these errors were encountered: