Replies: 2 comments
-
I believe the fix for this has been released in the latest version. PR for the fix was here |
Beta Was this translation helpful? Give feedback.
0 replies
-
@jeffsee55 is right. Tested locally using Deploys on Vercel are still using CLI v34.1, but that should be updated later today. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Hi folks 👋
We recently updated our library to include ESM build.
We use one case of import assertions in our typescript.
(
import englishI18n from '@shopify/polaris/locales/en.json' assert {type: 'json'};
)It appears that when this is built by Vercel, this file is not included. We can see that by running
vercel build
and looking in the.vercel/output/functions/app.func/.vc-config.json
file. This file missing causing the application to crash.Previously the CJS build worked, it used require instead of import, and with that the file was present in the final build.
This is affecting all of our users of our package that are currently using Vercel to deploy their applications.
Is it possible to use import assertions with Vercel? Are there any recommended work arounds?
Example
https://github.com/lizkenyon/vercel-shopify-app-april
Steps to Reproduce
vercel build
See that
import englishI18n from '@shopify/polaris/locales/en.json' assert {type: 'json'};
is not included in the.vercel/output/functions/app.func/.vc-config.json
file. This causes the deployment to crash.Beta Was this translation helpful? Give feedback.
All reactions