esbuild-css-modules-plugin icon indicating copy to clipboard operation
esbuild-css-modules-plugin copied to clipboard

Error with inject and karma-esbuild

Open angrycat9000 opened this issue 3 years ago • 3 comments

An error occurs when using the inject option with karma-esbuild. Not sure if it is an issue with esbuild-css-modules-plugin or karma-esbuild but I figured I would start here since karma-esbuild was handling CSS files and CSS modules without the inject option set. Here is an example repository to reproduce the issue.

Can you provide any insight into what difference the inject: 'selector'option is making in the output produced by esbuild?

Thanks for publishing this module btw!

angrycat9000 avatar Feb 16 '23 00:02 angrycat9000

could you please have a try with 3.x and set inject: false to my plugin?

indooorsman avatar Oct 16 '23 03:10 indooorsman

Using ^3.0.0 and setting plugins: [cssModulesPlugin({ v3: true, inject: false})], works without errors. However the styles do not load in that case.

angrycat9000 avatar Oct 16 '23 14:10 angrycat9000

I think you could try to bundle generated css files with karma-esbuild

Using ^3.0.0 and setting plugins: [cssModulesPlugin({ v3: true, inject: false})], works without errors. However the styles do not load in that case.

indooorsman avatar Nov 29 '23 06:11 indooorsman