parcel-bundler / parcel

The zero configuration build tool for the web. 📦🚀
https://parceljs.org
MIT License
43.43k stars 2.26k forks source link

Not using transformer-sass when using .scss file in pug #9191

Open kpotschi opened 1 year ago

kpotschi commented 1 year ago

🐛 bug report

When encountering a .scss file included in pug, Parcel seems to be using the css tranformer, instead of the scss tranformer


@parcel/transformer-css: Unexpected token Delim('&')

  /Users/kevinsensory/Coding/ploom-it-up/src/views/tutorial.pug:166:2
    165 | #tutorial {
  > 166 |   &__top {
  >     |   ^
    167 |     display: flex;
    168 |     flex-direction: column;

The file itself looks like this:


block css
        include tutorial.scss

block content 
        #tutorial__top
                #tutorial__top__heading.heading.heading--small Heading
                #tutorial__top__image
                #tutorial__top__text.text Lorem
        button#tutorial__button.btn.btn--light next

🤔 Expected Behavior

Parcel should compile the .scss file to css

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

cs42 commented 6 months ago

The problem still exists...

cs42 commented 6 months ago

I found a workaround: only the top level scss is not transformed correctly. So using a style.scss containing

@import styles_real.scss

with scss inside of styles_real.scss will work as expected.

github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.