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

Invalid JS identifier in exports parameter use case #20

Open
andvgal opened this issue Dec 28, 2014 · 3 comments · Fixed by #25
Open

Invalid JS identifier in exports parameter use case #20

andvgal opened this issue Dec 28, 2014 · 3 comments · Fixed by #25

Comments

@andvgal
Copy link

andvgal commented Dec 28, 2014

The "exports" option may be set to invalid identifier (e.g. with dash). Invalid JS code would get generated in UMD:

this.exports-value = factory(dep1, dep2);

I am not completely sure how valid is such use case, but the generated code can be changed to:

this["exports-value"] = factory(dep1, dep2);
@RReverser
Copy link
Owner

I'm not sure if it's critical - why would anyone wrap UMD with a name that can be later accessed also only as window['j-query'] and not just jQuery? But PR is welcome anyway.

@andvgal
Copy link
Author

andvgal commented Dec 29, 2014

I agree, it is not a priority at all.
Obviously, it does not make much sense for jQuery, but it may be used on intention not to pullute the global namespace (e.g. for plugin which needs to be referenced directly only once).
Can you please assign the ticket to me, so I don't forget about PR?

@RReverser
Copy link
Owner

Unfortunately tickets can be assigned only to project owners, so I'd recommend to track it separately.

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

Successfully merging a pull request may close this issue.

2 participants