-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[BUG] I customized ctViteConfig and that not work, error description is confused #20709
Comments
@guscj This seems to be a misconfiguration on your end. I think you can remove this part in the config: plugins: [
vue(),
vueJsx(),
] For information on using import aliases, see: #17846 (comment) |
Thank u!@sand4rt I add <script lang="jsx"> in my vue component and It can run now. By the way does ctViteConfig as same as vite.config.js? and can I use webpack to run component test? |
Nice @guscj! Kind of yeah, would recommend reading the docs for more info: https://playwright.dev/docs/test-components. |
@sand4rt I find this link: |
@guscj Thanks for explaining. The framework components cannot run directly in Node or in a browser (Node/browser does not understand If you use Webpack in your application, you could recreate the Webpack config in Vite. I'm still a bit concerned about this, but it is what it is for now i guess. I'm not sure if the Playwright team decides to change things later on. There is also some relevant info here: #19693 and here: #20193 |
@sand4rt I understand that! Thank u for your patiently explain. I gonna close this issue. ;) |
@sand4rt Hey, guys! I have an idea. |
Context:
Code Snippet
Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:
Describe the bug
I use this to test components.
When I use vscode plugin to run, it says : [vite:build-import-analysis] Parse error @:542:36.
When I use terminal to run, it says: [vite]: Rollup failed to resolve import "packages/form/src/form.vue" from "D:/test-use/playwright/index.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
@:542:36 is a jsx tag, I think that is why throw error.
But I already config @vitejs/plugin-vue-jsx in ctViteConfig and that not work.
So Its very confused and I dont know what else can do.
Very appriciated if you knew how to solve it!
The text was updated successfully, but these errors were encountered: