Open cizkey opened 2 years ago
@cizkey Hi, After debugging under the repository, it should not be related to windicss.
cypress itself uses tsconfig-paths
to handle the paths mapping in tsconfig.json
. tsconfig-paths
will use pattern *
as fallback by default, trying to match all paths relative to baseUrl.
https://github.com/dividab/tsconfig-paths/blob/master/src/mapping-entry.ts#L42
It just so happens that you have a windicss/index.ts
in the root directory of your repository, which causes cypress to resolve the require('windicss')
in vite-plugin-windicss
to this directory, resulting in the error in the above.
Just need to change the name of the windicss
directory in your repository and it should work.
I'm not sure if node_modules
can be ignored when match paths in tsconfig-paths
, if anyone knows, please let me know, thanks!
Describe the bug
When i used cypress + vite + vite-plugin-windicss + sass + vue3 try to do component test, i find it could not run correctly. I execute "cypress open-ct" command, after a while, occured an error. The error message as below:
It seems 'vite-plugin-windicss' or 'windicss' has a bug, I am not sure that. Really need you help, thanks.
Minimal Reproductions
https://gitee.com/maxwell0401/windicss-bug-reproduce-demo
Versions
Additonal Context
module.exports = (on, config) => { on('dev-server:start', (options) => startDevServer({ options })) return config }