Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with inject and karma-esbuild #49

Open
angrycat9000 opened this issue Feb 16, 2023 · 3 comments
Open

Error with inject and karma-esbuild #49

angrycat9000 opened this issue Feb 16, 2023 · 3 comments

Comments

@angrycat9000
Copy link

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!

@indooorsman
Copy link
Owner

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

@angrycat9000
Copy link
Author

angrycat9000 commented Oct 16, 2023

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants