Hi everyone,
I'm running into a build error in my Nuxt 3 app when executing pnpm run build, and I'm wondering if anyone else has experienced this.
It seems that Vite (via Rollup) fails to resolve the dayjs/plugin/updateLocale module, even though the plugin is supposed to be included automatically by dayjs-nuxt. Everything works fine during development, but the build fails in CI with this error coming from .nuxt/dayjs.imports.mjs.
This feels like a misconfiguration or maybe something that needs to be externalized explicitly — but according to the docs, updateLocale should be handled for us.
Has anyone encountered the same issue? Any insight would be appreciated before I dig further or apply a workaround directly in the config.
Thanks!
[nuxi] ERROR Nuxt Build Error: [vite]: Rollup failed to resolve import "dayjs/plugin/updateLocale" from "/src/node_modules/.cache/nuxt/.nuxt/dayjs.imports.mjs".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external