You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I have Storybook running in my Nx Angular project, however I have Ionic components that are not rendering correctly and the correct styles are not applied. I can see the styles when I inspect the stories in the browser, but they are not visible. I'm unable to find any documentation for using Storybook with Ionic so I'm hoping that someone could help with this by outlining how Storybook should be configured when using Ionic/Angular and Nx. I have included the path to my global scss file in the project.json, which has all of the ionic styling imported. I have also tried to import it in the preview.ts file, but I get the following error:
Module parse failed: Unexpected character '@' (12:0)
File was processed with these loaders:
* ./node_modules/resolve-url-loader/index.js
* ./node_modules/@angular-devkit/build-angular/node_modules/sass-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
| */
| /* Core CSS required for Ionic components to work properly */
> @import '@ionic/angular/css/core.css';
| /* Basic CSS for apps built with Ionic */
| @import '@ionic/angular/css/normalize.css';
@ ./libs/.storybook/preview.ts 8:0-61
@ ./storybook-config-entry.js 5:1140-1220 24:2-29:4 24:1096-29:3
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
Hi! I have Storybook running in my Nx Angular project, however I have Ionic components that are not rendering correctly and the correct styles are not applied. I can see the styles when I inspect the stories in the browser, but they are not visible. I'm unable to find any documentation for using Storybook with Ionic so I'm hoping that someone could help with this by outlining how Storybook should be configured when using Ionic/Angular and Nx. I have included the path to my global scss file in the project.json, which has all of the ionic styling imported. I have also tried to import it in the preview.ts file, but I get the following error:
Any help would be appreciated. Thanks :)
Nx v20.1.4
Angular v18.2.12
Ionic v7.2.0
Additional information
This is my current main.ts file:
This is my current project.json:
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions