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

UMD version? #26

Open
jhildenbiddle opened this issue Sep 21, 2016 · 3 comments
Open

UMD version? #26

jhildenbiddle opened this issue Sep 21, 2016 · 3 comments

Comments

@jhildenbiddle
Copy link

It would be handy if svgxuse was offered as a UMD library. This would allow it to be included in JavaScript bundles (Browserify/Webpack) using require or import statements.

I realize wrapping the existing code with a module.exports statement is easy to do manually, but doing so prevents me from updating the library via NPM when new versions are released.

Thanks!

@jaydenseric
Copy link
Contributor

If it helps, using webpack it imports and self initializes ok if you do this:

npm install svgxuse --save

And then at the top of your entry client JS:

import 'svgxuse'

@oskarkvamme
Copy link

yes, but isn't that a antipattern?

@jhildenbiddle
Copy link
Author

Thanks @jaydenseric!

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

3 participants