bahmutov / bahmutov/cypress-esbuild-preprocessor

importing css

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
83
Forks
13
Avg merge
12h 21m
Merged PRs (30d)
2

Description

Hi,
I'm trying to use this plugin with component testing. It adds this small amount of speed which gives a very smooth dev experience. :+1:
However, I can't apply my css styles.
With regular esbuild, I just add "index.css" to root html and it's ok.
I tried `import "mycss.css"` in support/index.js.
Looking at : /home/myhome/.config/Cypress/cy/production/projects/htmlrew-c7050eed47b7365eab4267f47e5954f4/bundles/cypress/support/ I can see a index.css bundling my "mycss".
So it seems to be handled.
I don't know if it's a limitation of this plugin/cypress or esbuild.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the component-testing case with `import "mycss.css"` in `support/index.js`, then inspect the generated `index.css` bundle under the Cypress support bundles directory. Compare the behavior with adding `index.css` to the root HTML when using regular esbuild. Done means the imported CSS is applied during component tests and the plugin or limitation is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
cypress, javascript
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.