DenoDDeno
Powered by
MqxM
Deno•3y 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
colors.scss
into
style.scss
style.scss
.

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


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

/colors.scss
/colors.scss


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

/src/client
/src/client


Because then all my other tasks would not work.
GitHub
GitHub - DenoPlayground/esbuild-plugin-sass
Contribute to DenoPlayground/esbuild-plugin-sass development by creating an account on GitHub.
GitHub - DenoPlayground/esbuild-plugin-sass
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Running esbuild with esbuild_deno_loader
ioBIioB / help
4y ago
Using ESBuild with Deno
MqxMMqx / help
3y ago
Decorators with esbuild-deno-loader
bennypBbennyp / help
11mo ago
Deno, TypeScript, ESBuild, WebGL, VSCode
pyzaistPpyzaist / help
3y ago