Comments (7)
hmm... can you to try and use a different importer than the built-in and see if that handles your case any better?
e.g using https://github.com/wessberg/sass-extended-importer
const {createImporter} = require("sass-extended-importer");
await esbuild.build({
...
plugins: [
sassPlugin({
...
importer: createImporter()
})
]
...
})
const impo
let me know how it goes
from esbuild-sass-plugin.
It does seem to be able to import now if I have a ~
infront, but it does not know how to import modules inside the material package.
error: Can't find stylesheet to import.
╷
28 │ @use '@material/animation/functions';
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
from esbuild-sass-plugin.
is there a way I can use sass-loader
with esbuild?
from esbuild-sass-plugin.
@danny519 if you create a project within issues/38 with enough of your sources to recreate the issue I will look into it
from esbuild-sass-plugin.
I created the example myself and I can clearly see where there's an hoisting problem with @Material that is not an issue of this plugin and neither of the importer.
I could have used the --shamefully-hoist
flag but for the little I understand about pnpm that defies its purpose.
I painstakingly added all the dependencies needed by the example and at the end it built fine so really the problem is that one has to work out and list down all the dependencies needed or see if there's a pnpm API that could be used.
I am going to close this issue because it's not pertinent to this plugin. It would be interesting to provide a working counter example to issue/38 where with sass-loader, webpack and pnpm one manages to get the same results without having to list the dependencies but I don't have time for it myself
from esbuild-sass-plugin.
@danny519 please have a look at this "improved" solution:
esbuild-sass-plugin/test/issues/38/build.js
Lines 1 to 20 in 9a291dc
which doesn't require all the dependencies being listed:
esbuild-sass-plugin/test/issues/38/package.json
Lines 6 to 16 in 9a291dc
from esbuild-sass-plugin.
thanks, I will check it out soon.
from esbuild-sass-plugin.
Related Issues (20)
- Resolving url() with CSS Modules HOT 2
- Support for bun HOT 2
- postcss Unocss inoperative HOT 2
- When "type" is "style" esbuild ignores url-imported files HOT 1
- How to handle relative `url` paths in 3rd party packages HOT 2
- postcssPresetEnv debug being captured/surpressed? HOT 2
- the src folder maybe needed in published package HOT 1
- `ERROR` Can't find stylesheet to import when I have `@use` in my `scss` files HOT 2
- Sourcemaps for lit-css imports are broken
- 'Could not resolve' error when importing a font file using a relative path in scss HOT 1
- Use `dart-sass` instead of `sass` HOT 6
- npm warning when upgrading to esbuild 0.20.0 HOT 3
- Support for ES-Modules
- Issue with 3.0.0 & Vite HOT 3
- Import of sass files without extension containing multiple dots (like ```common.mixins.scss```) HOT 1
- sass-embedded is not supported on all platforms HOT 3
- Package not compressing/minifying the bundled css files HOT 1
- Feature request: custom styleModule implementation HOT 1
- sass symlink will no longer be created with version 3.x of the plugin
- Builds with `embedded: true` hang forever on Cloudflare Pages worker HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esbuild-sass-plugin.