Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit dee0ea6

Browse files
Updated README
1 parent e1c46bf commit dee0ea6

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,36 @@ fetch(style)
6565
.then(css => console.log(css));
6666
```
6767

68+
## PostCSS and its plugins
69+
70+
Just set the `postcss.use` to `true` to enable PostCSS and set `postcss.plugins`
71+
to an array of plugins.
72+
73+
### Autoprefixer example
74+
75+
```js
76+
import esb from 'esbuild';
77+
import sassModules from '@squirrelnetwork/esbuild-sass-modules-plugin';
78+
import autoprefixer from 'autoprefixer';
79+
80+
await esb.build(
81+
{ bundle: true
82+
, sourceRoot: 'src/'
83+
, entryPoints: [ 'src/index.js' ]
84+
, outfile: 'build/app.js'
85+
, plugins:
86+
[ sassModules(
87+
{ postcss:
88+
{ use: true
89+
, plugins: [ autoprefixer ]
90+
}
91+
}
92+
)
93+
]
94+
}
95+
);
96+
```
97+
6898
## Documentation
6999

70100
See the [wiki](https://github.com/Squirrel-Network/esbuild-sass-modules-plugin/wiki/)

0 commit comments

Comments
 (0)