Ensure library consumers pull built version #1032
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 appendsrequire
'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.