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

fix: 3rd-party imports during build #3097

Merged
merged 1 commit into from
Jan 2, 2025
Merged

Conversation

tracy-french
Copy link
Contributor

@tracy-french tracy-french commented Jan 2, 2025

Overview

Currently, build artifacts are replacing import statements on third-party npm modules with relative paths due to an error in the vite/rollup package externalization config.

This change fixes the change, preventing the alteration of import statements externalized node_modules, as expected.

With this configuration change, package dependencies which are not explicitly included in the package.json will now be bundled by vite and included in a node_modules dir in the package artifacts. To prevent this from occurring, as we do not want to include any dependency code in our dist, the dependencies were explicitly added to each consuming package.json. This allows the plugin handling the externalization to recognize it should ignore the import.

Legal

This project is available under the Apache 2.0 License.

@tracy-french tracy-french marked this pull request as ready for review January 2, 2025 19:32
@tracy-french tracy-french merged commit 9ec7b4b into rc Jan 2, 2025
46 checks passed
@tracy-french tracy-french deleted the fix-third-party-imports branch January 2, 2025 19:35
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.

2 participants