-
It appears that esbuild does not support plugins in sync mode. Wondering if there are any potential solutions for bundling websites with SCSS/SASS transpilers? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
Yes, I have been thinking about plugins as well recently. This construct would need to invoke to async apis, which from my recollection doesn't play nice with cdk. But I will look into it again. More details on this cdk issue. The other limitation would be the Docker fallback. Not that it would be impossible to implement plugins for it, but it seems like a fair bit of work. Currently I'm inclined to drop the Docker fallback in the next major version. |
Beta Was this translation helpful? Give feedback.
-
Yes, async doesn't work with CDK. :( |
Beta Was this translation helpful? Give feedback.
-
Maybe something like this could be made work: https://dev.to/mamaar/aws-cdk-4249 Although it moves the code build further up the stack. Currently we only build the code when actually needed (i.e. as part of synthesize) |
Beta Was this translation helpful? Give feedback.
-
Not liking that solution :) Anything that moves away from CDK-way will just extra-complicate things in the future. |
Beta Was this translation helpful? Give feedback.
-
Hey @moltar Just wanted to let you know that I have shipped v2.1.0 which includes an escape hatch that can be utilized to support plugins. See https://github.com/mrgrain/cdk-esbuild/tree/main/examples/esbuild-with-plugins#readme for further details. |
Beta Was this translation helpful? Give feedback.
Hey @moltar Just wanted to let you know that I have shipped v2.1.0 which includes an escape hatch that can be utilized to support plugins.
See https://github.com/mrgrain/cdk-esbuild/tree/main/examples/esbuild-with-plugins#readme for further details.