-
Describe the bugRunning dev server works fine. At compile time, it exits with the error:
Reproductionhttps://github.com/truefusion/skittle
Expected behaviorTo compile without error. System InfoSystem:
OS: Linux 6.4 Arch Linux
CPU: (20) x64 13th Gen Intel(R) Core(TM) i5-13600KF
Memory: 50.25 GB / 62.63 GB
Container: Yes
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.5.0 - /usr/bin/node
Yarn: 3.5.0 - /usr/bin/yarn
npm: 9.8.1 - /usr/bin/npm
pnpm: 7.29.1 - /usr/bin/pnpm Additional context$ vitepress build docs vitepress v1.0.0-rc.4
SyntaxError: Unexpected token 'export' SyntaxError: Unexpected token 'export' Node.js v18.17.0 Validations
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Looks like that library is not SSR compatible and has invalid ESM. Something like this in your config might work for the latter: vite: {
ssr: {
noExternal: ['animejs/lib/anime.es.js'],
}
} For SSR compatibility, you'd need to import it dynamically inside onMounted. This is a bug with that library not Vite or VitePress. |
Beta Was this translation helpful? Give feedback.
-
The solution is to switch to bun, if possible. |
Beta Was this translation helpful? Give feedback.
The solution is to switch to bun, if possible.