storybookjs / frontpage

🌐 The website for storybook.js.org
https://storybook.js.org
MIT License
212 stars 116 forks source link

[bootstrap]: Compilation errors when adding bootstrap CSS import #680

Open roldengarm opened 3 months ago

roldengarm commented 3 months ago

Details

Recipe Page: bootstrap Recipe Template: bootstrap Browser:

What is wrong

When I add import 'bootstrap/dist/css/bootstrap.min.css'; to preview.ts, I get below error:

preview compiled with 1 error
ERROR in ./node_modules/bootstrap/dist/css/bootstrap.min.css 1:0
Module parse failed: Unexpected character '@' (1:0)
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
> @charset "UTF-8";/*!
|  * Bootstrap  v5.3.3 (https://getbootstrap.com/)
|  * Copyright 2011-2024 The Bootstrap Authors

I've generated the Storybook config using @nx/angular:storybook-configuration and it does not have a custom webpack config.

Screenshots

image image image