Closed
Description
Environment
- Operating System: Darwin
- Node Version: v22.5.1
- Nuxt Version: 3.15.3
- CLI Version: 3.20.0
- Nitro Version: 2.10.4
- Package Manager: [email protected]
- Builder: -
- User Config: compatibilityDate, devtools, css, modules, fathom, content, tailwindcss, pwa, postcss, vite, ignore, site, nitro, hooks, routeRules, components, app
- Runtime Modules: @nuxtjs/[email protected], @nuxtjs/[email protected], @nuxt/[email protected], [email protected], @vite-pwa/[email protected], @nuxtjs/[email protected], [email protected], @vueuse/[email protected]
- Build Modules: -
Version
v3
Reproduction
Clone the repository
git clone https://github.com/dbzx10299/content-test.git
Run npm install
and npm run dev
.
Here is a live example and there is no error in production
https://content-test.netlify.app/
Description
Clone the repository and run npm run build
=> npm run dev
. When the page is running locally, check the the directory .nuxt/content/components.ts
file and notice the following line
export const HeroModule = () => import('./../../pages/(home)/components/Hero/hero.module')
This produces a vite error and it can't find the file because the .css
extension is missing.
[plugin:vite:import-analysis] Failed to resolve import "./../../pages/(home)/components/Hero/hero.module" from ".nuxt/content/components.ts". Does the file exist?
This issue seems to also not happen in production only in development, but it is still a problem because there is an error overlay on the screen.
Additional context
No response