Reputation: 21
in my code i have multiple SCSS file, i made the component to download each SCSS downloadable. for that i need to compile the selected SCSS file while i create blob with the string '@import 'filename';@import 'file2name';. compiling through the angular click function (compile code 'npm run build-css')
Upvotes: 0
Views: 98
Reputation: 3277
As far as my understanding, you can not do that in browser. You need some sass compiler that will run on machine (some server) that can convert the scss to css.
I will suggest to create a cloud function or create an API in your server that can convert the scss to css which can be downloaded further on frontend.
Upvotes: 1