bundle-tools icon indicating copy to clipboard operation
bundle-tools copied to clipboard

Support SSR (Vite)

Open devlsh opened this issue 3 years ago • 3 comments

Clear and concise description of the problem

Currently attempted to use the Vite loader with vue-ssr results in an error:

[vite] Internal server error: Cannot find module '@intlify/vite-plugin-vue-i18n/messages' imported from 'x'

Suggested solution

I'm not sure what the issue is (I've no idea how the virtual import stuff from Vite works)

Alternative

No response

Additional context

No response

Validations

  • [X] Read the Contributing Guidelines.
  • [X] Read the README
  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

devlsh avatar Dec 30 '21 10:12 devlsh

Related to #2

devlsh avatar Dec 30 '21 10:12 devlsh

Same issue, when not using @intlify/vite-plugin-vue-i18n/messages You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle. warning is printed to console, so it looks like the plugin isn't used at all.

marekvospel avatar Mar 18 '22 14:03 marekvospel

I have this message in my project as well, anything I've tried from dozens of suggestions does not work.

geewhizbang avatar Mar 21 '22 16:03 geewhizbang