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

Library target is UMD which prevents library from being used in node.js #14

Closed
davidbarratt opened this issue Aug 13, 2019 · 1 comment · Fixed by #15 or #18
Closed

Library target is UMD which prevents library from being used in node.js #14

davidbarratt opened this issue Aug 13, 2019 · 1 comment · Fixed by #15 or #18

Comments

@davidbarratt
Copy link
Member

When I attempt to use this library in node.js I recieve the following error:

ReferenceError: window is not defined at Object. (/Users/dbarratt/Sites/wikimedia/interaction-timeline/next/node_modules/banana-i18n/dist/banana-i18n.js:1:194)

This seems to be because the libraryTarget is umd instead of commonjs2

@santhoshtr
Copy link
Member

feildmaster added a commit to feildmaster/banana-i18n that referenced this issue Sep 14, 2019
Fixes wikimedia#14 while keeping web support
santhoshtr pushed a commit that referenced this issue Sep 14, 2019
* revert: Switch libraryTarget from umd to commonjs2

This is not the proper way to add support for Node, this breaks web support

* Set global object to "this"

Fixes #14 while keeping web support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants