FranckFreiburger / vue3-sfc-loader

Single File Component loader for Vue2 and Vue3. Load .vue files directly from your HTML. No node.js environment, no build step.
MIT License
1.03k stars 116 forks source link

less.render not support syncImport:true rendering @import #101

Closed huanshiwushuang closed 5 months ago

huanshiwushuang commented 2 years ago

Describe the bug

less.render() does not support synchronous rendering @import. The syncImport attribute is invalid. If there is an @import string and syncImport: true, the callback function will never be called

The code from @vue/compiler-sfc/dist/compiler-sfc.cjs.js

nodeLess.render(getSource(source, options.filename, options.additionalData), Object.assign(Object.assign({}, options), { syncImport: true }), (err, output) => {
        error = err;
        result = output;
    });

To Reproduce

Expected behavior

Versions

Additional context

FranckFreiburger commented 5 months ago

Duplicate of #54