compiler-sfc: 解析Scss时实现处未支持异步的情况,前面的API调用都已经支持了异步,但是实现的时候却只处理了同步的情况, 是否考虑在实现处支持promise的情况
What problem does this feature solve?
最近在做一些关于移植到浏览器内支持vue-sfc-loader时,浏览器内的scss.js 仅支持异步函数解析,处理到这块会出现问题,是否要增加代码适配scss异步的情况
What does the proposed API look like?
if(options.isAsync){
result = await new Promise((resolve, reject) => {
nodeSass.render(finalOptions, (err, res) => { // node-scss 官方的语法, 浏览器内也只要实现一遍render方法即可
resolve(res)
})
})
} else{
result = nodeSass.renderSync(finalOptions)
}
Hello, make sure to always provide a reproduction that follows the instructions at https://new-issue.vuejs.org/?repo=vuejs/vue-next#why-repro.
Open a new issue with a reproduction that follows those instructions if you manage to create a boiled down reproduction.