parcel icon indicating copy to clipboard operation
parcel copied to clipboard

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

Open kpotschi opened this issue 1 year ago • 1 comments

🐛 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

kpotschi avatar Aug 14 '23 07:08 kpotschi

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.

github-actions[bot] avatar Feb 10 '24 12:02 github-actions[bot]

The problem still exists...

cs42 avatar Mar 19 '24 12:03 cs42

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.

cs42 avatar Apr 01 '24 07:04 cs42