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

Allow mocking and aliasing externals #1118

Open
pi0 opened this issue Apr 7, 2023 · 0 comments
Open

Allow mocking and aliasing externals #1118

pi0 opened this issue Apr 7, 2023 · 0 comments
Labels
enhancement New feature or request performance

Comments

@pi0
Copy link
Member

pi0 commented Apr 7, 2023

When bundling and inlining dependencies, we have a chance to use rollup configuration to mock some unwanted external dependencies using unenv (nuxt uses this for example for vue deps).

This is not possible when externalizing those dependencies and using nitro externals + nft to track them.

With a new option like externals.alias, we can instruct nft to use a mocked and auto-generated package instead. Previously it wasn't possible but with new implementation of externals plugin with full-control over dep graph, we can do this.

@pi0 pi0 changed the title Allow mocking externals Allow mocking and aliasing externals Apr 7, 2023
@pi0 pi0 added enhancement New feature or request performance labels Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance
Projects
None yet
Development

No branches or pull requests

1 participant