@@ -8,19 +8,13 @@ A plugin for [esbuild](https://esbuild.github.io/) to handle Sass & SCSS files.
8
8
### Features
9
9
* ** PostCSS** & ** CSS modules**
10
10
* support for ** constructable stylesheet** to be used in custom elements or ` dynamic style ` to be added to the html page
11
- * uses the ** new [ Dart Sass] ( https://www.npmjs. com/package /sass ) Js API** .
11
+ * ** [ Sass Embedded ] ( https://github. com/sass /sass/issues/3296 ) Async API** . (Thank you @ NathanBeddoeWebDev )
12
12
* caching
13
13
* ** url rewriting**
14
14
* pre-compiling (to add ** global resources** to the sass files)
15
15
16
- ### Breaking Changes
17
- * ` type ` has been simplified and now accepts only a string. If you need different types in a project [ you can use more
18
- than one instance] ( https://github.com/glromeo/esbuild-sass-plugin/issues/60 ) of the plugin.
19
- You can have a look at the [ ** multiple** fixture] ( https://github.com/glromeo/esbuild-sass-plugin/blob/main/test/fixture/multiple )
20
- for an example where ** lit CSS** and ** CSS modules** are both used in the same app
21
- * The support for [ node-sass] ( https://github.com/sass/node-sass ) has been removed and for good.
22
- Sadly, node-sass is at a dead end and so it's 1.x.
23
- * ` transform ` now is expected to send back the CSS text in contents and anything that has to be default exported in ` pluginData ` .
16
+ ### Breaking Changes (...maybe)
17
+ * upgraded to esbuild 0.20
24
18
25
19
### Install
26
20
@@ -353,19 +347,18 @@ There's a working example of using `pnpm` with `@material` design
353
347
in [issue/38](https://github.com/glromeo/esbuild-sass-plugin/tree/main/test/issues/38)
354
348
355
349
### Benchmarks
356
- **Windows 10 ** Pro - **i7-4770K ** CPU @ **3.50 **GHz - RAM **24 **GB - SSD **500**GB
350
+ **Windows 11 ** Pro - **i7-490K ** CPU @ **4.00 **GHz - RAM **32 **GB - SSD **500**GB
357
351
358
352
Given 24 × 24 = 576 lit-element files & 576 imported CSS styles plus the import of the full bootstrap 5.1
359
353
360
- | | dart sass | dart sass (no cache) | node- sass* | node- sass (no cache) |
361
- |------------------------|-----------|-----------------------|-- -----------|----------------------|
362
- | **initial build** | 2.750s | 2.750s | 1.903s | 1.858s |
363
- | rebuild (.ts change) | 285.959ms | 1.950s | 797.098ms | 1.689s |
364
- | rebuild (.ts change) | 260.791ms | 1.799s | 768.213ms | 1.790s |
365
- | rebuild (.scss change) | 234.152ms | 1.801s | 770.619ms | 1.652s |
366
- | rebuild (.scss change) | 267.857ms | 1.738s | 750.743ms | 1.682s |
354
+ | | sass-embedded | sass-embedded (no cache) | dart sass | dart sass (no cache) |
355
+ |------------------------|---------------- |--------------------------| -----------|----------------------|
356
+ | **initial build** | 731.312ms | 779.363ms | 2.450s | 2.450s |
357
+ | rebuild (.ts change) | 170.35ms | 188.861ms | 179.125ms | 1.710s |
358
+ | rebuild (.ts change) | 155.802ms | 167.413ms | 176.849ms | 1.576s |
359
+ | rebuild (.scss change) | 203.746ms | 160.601ms | 188.164ms | 1.575s |
360
+ | rebuild (.scss change) | 152.733ms | 144.754ms | 145.835ms | 1.520s |
367
361
368
- (*) node-sass is here just to give a term of comparison ...those samples were taken from 1.8.x
369
362
370
363
[travis-url]: https://app.travis-ci.com/glromeo/esbuild-sass-plugin
371
364
[travis-image]: https://app.travis-ci.com/glromeo/esbuild-sass-plugin.svg?branch=main
0 commit comments