Open ryanzec opened 2 weeks ago
After more searching, instead of the adding the sveltekit plugin, I needed to add the svelte plugin like this:
ctViteConfig: {
plugins: [svelte({ preprocess: vitePreprocess() })],
resolve: { alias: { $lib: path.resolve('src/lib') } },
},
I don't know if it should work with the sveltekit plugin but since this is for component test, sveltekit really is not needed.
While there does not seems to be a bug in playwright itself, it would be helpful for this to live on the component testing page so that people don't follow the guide and have it not work and not know why.
If this should work with sveltekit too (which I guess would be good for testing that components work with SSR), I have no idea if that is a bug in Playwright and configuration that I am not able to figure out.
I would add that I do think being able to using sveltekit
with playwright is important if possible as components will often use $app/*
which is part of sveltekit
.
Version
1.43.1
Steps to reproduce
clone this repo: https://github.com/ryanzec/edg-ui run
pnpm install
runpnpm test:components
Expected behavior
test should run
Actual behavior
error after code builds
Additional context
I followed the guide on the website an initially I got an error when it tried to compile code with TS:
so I have to add in the sveltekit plugin to the playwright config but then I get this error.
Environment