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

Don't bundle dependencies during build and remove noExternal default #1016

Closed
benmccann opened this issue Apr 14, 2021 · 1 comment
Closed
Milestone

Comments

@benmccann
Copy link
Member

benmccann commented Apr 14, 2021

A large portion of user issues are related to whether packages go in dependencies or devDependencies. This seems to be because of:

noExternal: Object.keys(pkg.dependencies || {})

noExternal means that Vite should bundle the packages. We added this line to have Vite bundle all the dependencies to make deployment to the serverless environments easy. At the moment, in most (if not all) of our adapters, we are using APIs which skip the platform bundling step. However, none of the serverless environments we use actually seem to require this. E.g. Vercel for example can do the bundle themselves using a different file structure. Netlify and Begin also look like they don't require us to bundle in the build step as we're doing today

@benmccann
Copy link
Member Author

benmccann commented Apr 22, 2021

#1148 removed noExternal from the template. Though it did not change the way the adapters work. If the adapters still work we can close this. Otherwise, we may need to update them

Even if removing noExternal from the template happened to break the adapters, we should not add it back. Removing it fixed so many issues like #1113 that it needs to remain dead forever

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

No branches or pull requests

1 participant