When using Vue 3, a compilation error occurred in <></> in tsx
See original GitHub issueConfiguration used in the plugin
plugins: [
vueJsx(),
esbuild({
jsxFactory: 'vueJsxCompat',
}),
vue(),
]
Use in code
const CardContainer = defineComponent({
setup(props) {
return () => <> text </>
}
})
Compiled results
const CardContainer = defineComponent({
setup(props2) {
return () => /* @__PURE__ */ vueJsxCompat(React.Fragment, null, " text ");
}
});
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
Why does vue fail to recognize TS syntax on the first ...
ERROR Failed to compile with 1 errors 3:54:55 PM error in ./src/components/ATSText/TextDate.vue Module Error (from ./node_modules/eslint-loader/ ...
Read more >ts-loader - npm
TypeScript: 3.6.3+; webpack: 5.x+ (please use ts-loader 8.x if ... The build should fail on TypeScript compilation errors as of webpack 2.
Read more >TypeScript Programming with Visual Studio Code
Another option is to install the TypeScript compiler locally in your project ( npm install --save-dev typescript ) and has the benefit of...
Read more >Using Vue with TypeScript - Vue.js
This reduces the chance of runtime errors in production, and also allows us to ... If you have Vetur currently installed, make sure...
Read more >Compiling Vue 3 from scratch and trying the new Composition ...
Try Vue 3 RIGHT NOW — by compiling it from scratch using the ... to get static typechecking on our templates, like in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
vue created official transform library
try