question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unknown file extension ".css"

See original GitHub issue

Environment

Nuxt CLI v3.0.0-27245590.7c3b488 18:38:45 RootDir: /home/projects/github-ar5zza-xbrnjt 18:38:49 Nuxt project info: 18:38:49


  • Operating System: Linux
  • Node Version: v14.16.0
  • Nuxt Version: 3.0.0-27245590.7c3b488
  • Package Manager: npm
  • Bundler: Vite
  • User Config: build
  • Runtime Modules: -
  • Build Modules: -

Describe the bug

fresh install

yarn dev > Unknown file extension “.css” for /home/projects/github-ar5zza-xbrnjt/node_modules/swiper/swiper.min.css

yarn build > start work fine .

Reproduction

https://stackblitz.com/edit/github-ar5zza-xbrnjt?file=app.vue

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
danielroecommented, Oct 21, 2021

An alternative would be to transpile the swiper module as well as that is where the css is coming from:

import { defineNuxtConfig } from 'nuxt3'

export default defineNuxtConfig({
  build: {
    transpile: ['@vueform/slider', 'swiper'],
  },
})
0reactions
ZipoKingcommented, Oct 21, 2021

Thanks! In my case I have added bootstrap into build.transpile and things are working back!

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Hydrogen Unknown file extension ".css" when using ...
I'm trying to use a Splide Slider library inside my Hydrogen project. Hydrogen makes use of server components. So, I created the slider...
Read more >
Fun with Node experimental modules and loaders
to “inline” the CSS file as a string in your Javascript file. ... Without custom loader, the result would be an “Unknown file...
Read more >
unknown file extension - You.com | The AI Search Engine You ...
Can't run my Node.js Typescript project TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /app/src/App.ts Ask Question Asked 2 years, 6 ...
Read more >
Features | Vite
You can also use CSS modules combined with pre-processors by prepending .module to the file extension, for example style.module.scss .
Read more >
Content Types - ESBuild
Some file extensions already have a loader configured for them by default, although the defaults can be overridden. #JavaScript. Loader: js. This loader...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found