Skip to content

fix(build): Use "umd" as library target for libraries #43

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nanovazquez
Copy link
Contributor

@nanovazquez nanovazquez commented Aug 4, 2020

Today when installing the packages in a web app, we are getting this error:

image

This could be caused by multiple reasons, and sadly we cannot reproduce it locally through npm link. This PR tries to fix the issue by:

  • Replacing the libraryTarget from commonjs2 to umd, as commonjs uses require() to load dependencies.
  • Force the target to web (although web is the default value). This is to let Webpack know that the environment is a browser and thus, the require() function is not available.

@nanovazquez nanovazquez requested a review from tfoxy August 4, 2020 14:51
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 this pull request may close these issues.

1 participant