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

Ensure library consumers pull built version #1032

Merged
merged 2 commits into from
Feb 3, 2021
Merged

Ensure library consumers pull built version #1032

merged 2 commits into from
Feb 3, 2021

Conversation

arindam1993
Copy link
Contributor

@arindam1993 arindam1993 commented Feb 3, 2021

Fixes #1030
Fixes #1032

Depending on users bundler configuration, some bundlers would point to the index.js file, and this would let the users bundler take over build responsibilities.

With this change, all usage of this library will always point to the built bundle.Had to make imports in a few tests explicit as a result.

Fixes #970
I also update the build config to handle node builtins used by dependencies in a cleaner fashion, by declaring externals rollup appends require's to the top of the bundle, I switched that to using the plugin that provides shims for node builtins.

These shims get automatically treeshaken out from the bundle.

I tested this by using an external webpack project and it works great with no errors.

@arindam1993 arindam1993 merged commit ff4f8d1 into main Feb 3, 2021
@bradgreens
Copy link

Thank you @arindam1993

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.

mapbox-gl Version 2 Built file in master requires fs
3 participants