vuejs / vue-jest

Jest Vue transformer
MIT License
748 stars 156 forks source link

feat: pass styleOption into compiler #398

Closed Szymon-dziewonski closed 3 years ago

Szymon-dziewonski commented 3 years ago

From https://github.com/sass/dart-sass/releases/tag/1.34.0 there are new couple breaking changes e.g 10/2 now should be written as math.div(10/2). With that change there deprecated message info which pollutes logs. Of course for your own code people can adjust scss/sass/less files, however for external libraries like bootstrap 4 it's not possible, which means there is a lot of info messages that slows build time. For webpack build we can pass options Add a --quiet-deps flag which silences compiler warnings from stylesheets loaded through --load-paths. like

loaderOptions: {
    sass: {
        sassOptions: {
           quietDeps: true,
       }
    },
},

Thats why I did this PR because its no possible for jest tests to pass additional options such as quietDeps: true

lmiller1990 commented 3 years ago

Seems fine, thanks! I can release this in the next few days.

lmiller1990 commented 3 years ago

Do we need something similar for the v3 package?

Szymon-dziewonski commented 3 years ago

@lmiller1990 Thank you, probably yes, can be done for v3 too, which I missed, my bad

Szymon-dziewonski commented 3 years ago

@lmiller1990 I can probably create another PR for v3 version if you would like me to do :)

lmiller1990 commented 3 years ago

Sure, that'd be great!