I'm currently working on an project in ionic (angular) and attempting to include Swiper (version 11.1.0) for sliding elements. However, I encounter the following compilation error:
./node_modules/swiper/swiper.css:14:0 - Error: Module parse failed: Unexpected character '@' (14:0) [ng] You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders [ng] | [ng] | /* FONT_START */ [ng] > @font-face { [ng] | font-family: 'swiper-icons'; [ng] | src: url('data:application/font-woff; My environment setup is as follows:
Angular CLI: 17.3.3 Node: 18.18.0 Package Manager: npm 9.8.1 OS: win32 x64 Angular: 17.3.3 Various Angular packages with their respective versions rxjs: 7.8.1 TypeScript: 5.2.2 zone.js: 0.14.4 @angular-devkit/build-angular: 17.2.3
I have literally spent nights over it but no fix.
I tried adding
/* In src/global.scss */ @import "~swiper/swiper-bundle.css";