You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Click on the link to go to the server route. Works in dev mode.
Cancel process and run npm run build && npm run preview to see production mode.
Click on link again. Fails.
Describe the bug
In previous versions I had created a server route that compiled messages using generateJSON from @intlify/bundle-utils. This worked well up until 8.0.0-beta.13.
Now there seems to be an issue importing message-compiler, because it tries to load cjs version but the server bundle only contains esm module.
Environment
N/A
Reproduction
https://stackblitz.com/edit/github-ec6imb
Click on the link to go to the server route. Works in dev mode.
Cancel process and run
npm run build && npm run preview
to see production mode.Click on link again. Fails.
Describe the bug
In previous versions I had created a server route that compiled messages using
generateJSON
from@intlify/bundle-utils
. This worked well up until 8.0.0-beta.13.Now there seems to be an issue importing message-compiler, because it tries to load cjs version but the server bundle only contains esm module.
Manually patching the included bundle-utils to use
import
syntax instead ofrequire
works:https://github.com/intlify/bundle-tools/blob/ae09d0a7c409ffbdfad0fc25f2a54968f8bde4b9/packages/bundle-utils/src/codegen.ts#L17-L23
Also few other observations:
LocationStub
is renamed toLOCATION_STUB
, so I think this import is currently broken.bundle-utils
arebeta.20
but other i18n related dependencies arebeta.22
, I am guessing that mismatch is not intended?Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: