-
Notifications
You must be signed in to change notification settings - Fork 33
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
bug: ESM not supported in Node.js 14 environment #16
Labels
bug
Something isn't working
Comments
Tracking these issues as potential solutions:
Hopefully we can just configure SvelteKit to output CJS for SSR 🤞 |
This was referenced Mar 14, 2021
It seems there was a workaround to this issue which is currently working in This workaround was lifted from the official adapters like |
jthegedus
changed the title
ESM not supported in Node.js 14 environment
bug: ESM not supported in Node.js 14 environment
Mar 22, 2021
#39 uses https://esbuild.github.io/ to compile to commonjs working around this issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Node.js 14 Google Cloud Function environment does not support ESM yet - GoogleCloudPlatform/functions-framework-nodejs#233
This support is required for Firebase Cloud Functions and if we want to use the same
handler.js
here for both Cloud Run and Cloud Functions.Since the Vite SSR
app.js
file imports@sveltejs/kit/renderer
via ESMimport
, and the@sveltejs/kit
lib only outputs ESM, we cannot use SvelteKit in Cloud Functions.Work arounds
Until this is supported, we have a some options:
app.js
file through Rollup and bundle/compile/transpile/transform the depsI am likely going to go with
2.
for now.The text was updated successfully, but these errors were encountered: