-
-
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
Add back esbuild
configuration options adapters
#3733
Comments
If you don't want to waste resources from the adapter attempting to adapt the build and failing, you can set an environment variable and use it through |
That works for solving this particular issue, but there's another issue because the targets passed to ESbuild are incorrect:
I'll open up a separate issue for this |
Reopening this issue for a different reason, we need to pass build plugins to |
esbuild
configuration options to Cloudflare adapteresbuild
configuration options adapters
Another request for this in #5756, which I closed as a duplicate of this issue |
I am using Azure AD B2C for authentication. Microsoft provides extensions for account caching for refreshing access tokens. These extensions are provided as a C++ addon (and one of their dependencies is another C++ addon). Using the Node adapter results in a The author of esbuild has offered a plugin to solve this problem. I could not figure out how to apply this plugin and from this issue I'm assuming it is not possible. Are there any known workarounds? Realized through some help on the discord that my adapter version was out of date. Was still using a version of adapter-node that used esbuild. Using the current |
I dug into this a bit more and figured out why node modules aren't being included in the build despite adding the polyfills to the Trying to figure out a workaround but it's really difficult without access to the esbuild options in the adapter. |
Describe the problem
For local and testing builds we use MockServiceWorker for our mocks. There's a Node component to the library so we can mock requests in SSR. However, it uses Node libraries, and
esbuild
throws an error if the platform is not set tonode
when we build for production. We want to test our app with a production build so that it's as close to what will actually ship as possible.Without the
esbuild
configuration option, there's no way for us to change the platform specifically for test builds.Describe the proposed solution
An option for configuring the build within adapters.
Alternatives considered
Another possibility would be changing the target/platform based on whether or not it is a "preview" build. Since previewing first requires us to build the app with a separate command, I'm not sure how this could be signaled to the build. Maybe a build flag?
Importance
i cannot use SvelteKit without it
Additional Information
Currently operating off a fork so we can use the latest SvelteKit.
The text was updated successfully, but these errors were encountered: