-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
[antd, mantine] Content script ui compiled error when using UI components #703
Comments
@aklinker1 Do you have time to take a look? |
Sorry, no idea what is going on. Reproduction is good. There aren't sourcemaps provided by antd, so I'm not sure why Vite is attempting to load them, nor what the original error is. If someone else wants to debug this, feel free. I don't have time right now. |
Also seeing this with mantine, see the new |
yeah, The issue at hand is causing significant frustration, to the extent that I had to switch the component library. Even when attempting to block error information in the configuration file, it seems like it may impact compilation speed. It is my hope that someone can provide a solution for this matter. |
Discovered something maybe relevant here today? If you add a package to vite's // wxt.config.ts
vite: () => ({
plugins: [Icons({ compiler: "vue3" }), Vue()],
+ ssr: {
+ noExternal: [/.*/],
+ },
}),
There was about 4x as many logs as I've shown above, truncated it for clarity. |
@aklinker1 may be the same issue : vite issue, You see if it helps. |
I also encountered this issue before. The conclusion is that it's a problem with Vite (Rollup), not WXT. The issue arises because the presence of directives (like use client;) in React components isn't accounted for, causing the generated sourcemap lines to be misaligned. While many people in the thread ignore the warning, I found that broken sourcemaps cause issues, so I've been using the https://github.com/huozhi/rollup-preserve-directives solution from that answer as a workaround. However, using this plugin can significantly increase build times and degrade performance. 🙃 |
The vite team seems to have decided to ignore the warning vitejs/vite-plugin-react#369. Next release of |
Gonna close this then! Thanks for finding that @1natsu172 |
Describe the bug
As long as in the content script ui (Such as: entrypoints/example-ui.content/App.tsx), reference to the component of the three-party component library
antd
, the compilation error will be reported, in the configuration of vite, sourcemap off still failed to compile; This is normal in popup or other newtab pagesErrors are as follows:
Reproduction
wxx-react.zip
Steps to reproduce
Run
pnpm dev
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: