This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
Scss compilation #69
Labels
Comments
I have the same question, where can I get the sass.js ? |
Likewise! It doesn't seem to be the dart-sass compilation. |
I have the same question |
As mentioned in #33, you can get sass.js from https://github.com/medialize/sass.js To avoid receiving "ReferenceError: sass is not defined", declare a variable The following example works for me. <script src="<path_to>/sass.js"></script>
<script>
const sass = new Sass()
httpVueLoader.langProcessor.scss = function (scssText) {
return new Promise(function(resolve, reject) {
sass.compile(scssText, function (result) {
if ( result.status === 0 )
resolve(result.text)
else
reject(result)
});
});
}
new Vue({
el: '#my-app',
components: {
'my-component': httpVueLoader('my-component.vue')
}
});
</script> |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've been working with scss tag but, using the code in the example, i can't get it to work, i just see a "ReferenceError: sass is not defined" message, how can i make this work?
The text was updated successfully, but these errors were encountered: