How to handle relative import stylesheets #26178
Unanswered
wbolduc
asked this question in
Component Testing
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the documentation it's recommended to keep your component-index.html as similar to the actual root of the project as possible.
In our project root we use relative imports for the stylesheets that we maintain. For example
<link rel="stylesheet" href="/static/css/base.css">
How do I get cypress component testing to use the correct baseURL for this relative import if the devServer option doesn't have baseURL?
Without this option the component tester opens on localhost:8080 which obviously does not have the correct relative position
I could list the a specific server to use to get stylesheets but I would like this to work on both the dev machines AND the testing server so I would like to avoid hardcoding
Beta Was this translation helpful? Give feedback.
All reactions