MqxM
Deno3y ago
27 replies
Mqx

ESBuild SASS Plugin

Hey,

I have developed this Plugin: https://github.com/DenoPlayground/esbuild-plugin-sass

But I have some problems with the import paths from the SASS module. Maybe someone can help me to debug this, since ESBuild does not have an official community server.

The problem at the moment is that when the SASS module tries to resolve an import it does that by assuming that the path is relative to the root directory and not the file that is currently processed. Maybe there is a way to account for this issue. For example if we would assume that this is our file structure and we import colors.scss into style.scss.

/src/client/style.scss
/src/client/colors.scss


When the SASS module resolves the import it is trying to load the colors.scss from:

/colors.scss


Because this is where the initial task gets started. But I can not simply set the new root to:

/src/client


Because then all my other tasks would not work.
GitHub
Contribute to DenoPlayground/esbuild-plugin-sass development by creating an account on GitHub.
GitHub - DenoPlayground/esbuild-plugin-sass
Was this page helpful?