-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Vercel Build Fails as Can't Set EsBuild Externals #3588
Comments
Related: #3306 |
Would an API like this work? import adapter from '@sveltejs/adapter-vercel';
export default {
adapter: adapter({
external: ['@napi-rs/*']
}),
// ...
}; |
@Rich-Harris, that should definitely resolve the issue! |
This was referenced Mar 6, 2022
I was struggling with the same issue in
Note that Posting here for others who may be searching for this info. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
My vercel build has been failing since the removal of the esBuild config options in @sveltejs/adapter-vercel.
I've continued developing using the following package versions (last working):
However, that's definitely less than ideal as I'm continuing to build around an outdated API for both @sveltejs/kit & @sveltejs/adapter-vercel.
The dependency causing my build issues (@napi-rs/*) is a package required indirectly as a dependency of a package in a shared monorepo used in the frontend. (Backend defines db schema, controllers, autogen type definitions, etc. that are used both in the frontend and for writing real time data scraped from various sources to the db, hence the monorepo greatly streamlines the dev process).
I'd previously built the frontend project successfully using both Vite resolve.alias and via installing the pnpm symlinked version of the built package as a dependency during the build process (setting pnpm to shamefully-hoist when building on Vercel) using the following esBuild config options:
Following the breaking API changes, I've tested with updated versions of @sveltejs/kit & @sveltejs/adapter-vercel using at least the following Vite config settings (both individually and in varying combinations), but to no avail.
Vite Config Options Tested:
(I think I'd tried setting it as a rollup external as well using Vite config options, but that also failed to resolve the issue)
Build always fails with the following error:
Any solutions for getting this build to work with the latest versions of @sveltejs/kit and @sveltejs/adapter-vercel?
Reproduction
I'm more than happy to setup a minimal reproduction of the issue if necessary, but iirc this is something @Rich-Harris is aware of per the checklist in PR #2931.
Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: