Created
August 17, 2022 20:20
-
-
Save mxro/d40f3c3f58eb276b42ebdc65224eb0ee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { build } from 'esbuild'; | |
| import cssServerPlugin from 'esbuild-css-modules-server-plugin'; | |
| const generatedCss: string[] = []; | |
| const res = await build({ | |
| plugins: [ | |
| cssServerPlugin({ | |
| onCSSGenerated: (css) => { | |
| generatedCss.push(css); | |
| }, | |
| }), | |
| ], | |
| }); | |
| console.log('Generated CSS:'); | |
| console.log(generatedCss.join('\n')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment