You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
change directory to esbuild-plugin-test cd ./tests/esbuild-plugin-test/.
run test script pnpm run test.
Describe the bug
I'm developing a custom plugin based on unplugin, designed to scan my project for components and report unused ones. It works as expected in vite and webpack, but when I try to test it with esbuild, I encounter the following error:
stdout | esbuild.test.ts > esbuild > should run esbuild tests
Found 2 unused components:
- /Users/user/Desktop/boyuansu/unplugin-unused-components/tests/fixtures/TestUnused.vue
- /Users/user/Desktop/boyuansu/unplugin-unused-components/tests/fixtures/TestUnusedReact.jsx
❯ esbuild.test.ts (1 test| 1 failed) 60ms
× esbuild > should run esbuild tests 59ms
→ Build failed with 2 errors:
../fixtures/TestUsed.vue:1:0: ERROR: The JSX syntax extension is not currently enabled
../fixtures/TestUsed.vue:4:10: ERROR: Expected "}" but found "{"
I've tried to remove my custom plugin and the fixtures setup work fine with esbuild config.
Is there anything specific I need to do to support esbuild with unplugin?
Any known caveats or extra config I might be missing?
Environment
node: 20
unplugin: 2.3.5
Reproduction
https://github.com/BoYuanSu/unplugin-unused-components/tree/fix/esbuild-test
install deps,
pnpm i.change directory to esbuild-plugin-test
cd ./tests/esbuild-plugin-test/.run test script
pnpm run test.Describe the bug
I'm developing a custom plugin based on
unplugin, designed to scan my project for components and report unused ones. It works as expected inviteandwebpack, but when I try to test it withesbuild, I encounter the following error:I've tried to remove my custom plugin and the fixtures setup work fine with esbuild config.
Is there anything specific I need to do to support esbuild with unplugin?
Any known caveats or extra config I might be missing?
Thanks!
Additional context
No response
Logs