Subscribe on changes!

StylePreprocessor Async request to compile Sass/Scss in the browser

avatar
Apr 16th 2022

What problem does this feature solve?

solve

Can compile Vue and Sass in the browser.(CDN)

  • Library to compile Vue

URL:https://github.com/FranckFreiburger/vue3-sfc-loader

CDN:https://cdn.jsdelivr.net/npm/vue3-sfc-loade

  • Library to compile Sass

URL:https://github.com/medialize/sass.js/blob/master/docs/getting-started.md

CDN:https://cdn.jsdelivr.net/npm/sass.js@0.11.1/dist/sass.sync.js

reason

the package vue-compile-sfc does not support async function, in brower sass.js doesnt support sync. https://github.com/FranckFreiburger/vue3-sfc-loader/issues/125

What does the proposed API look like?

const result = nodeSass.renderSync(finalOptions)

const result = await nodeSass.renderSync(finalOptions)

https://github.com/vuejs/core/blob/4a3237ad9300693e465f82a6be3552565a1c4be3/packages/compiler-sfc/src/stylePreprocessors.ts#L36

avatar
Apr 16th 2022

Can you explain more than one sentence:

  1. What the problem is
  2. Why it needs to be fixed at our end.
avatar
Mar 15th 2023

Closing due to lack of response

avatar
Sep 6th 2023

tow years passed #5231