Skip to content
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

script标签里无法编译第三方组件库 #10809

Closed
7 tasks done
nuaajiangteng opened this issue Nov 7, 2022 · 3 comments
Closed
7 tasks done

script标签里无法编译第三方组件库 #10809

nuaajiangteng opened this issue Nov 7, 2022 · 3 comments
Labels
invalid This doesn't seem right

Comments

@nuaajiangteng
Copy link

nuaajiangteng commented Nov 7, 2022

Describe the bug

代码:

<script setup lang="jsx"> ...

image

... </script>

问题: 无法编译成浏览器可识别的标签
image

Reproduction

Steps to reproduce

No response

System Info

Used Package Manager

npm

Logs

No response

Validations

@nuaajiangteng nuaajiangteng changed the title 1 script标签里无法编译第三方组件库 Nov 7, 2022
@nuaajiangteng nuaajiangteng reopened this Nov 7, 2022
@github-actions
Copy link

github-actions bot commented Nov 7, 2022

Hello @nuaajiangteng. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with need reproduction will be closed if they have no activity within 3 days.

@nuaajiangteng
Copy link
Author

Hello @nuaajiangteng. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with need reproduction will be closed if they have no activity within 3 days.

https://github.com/nuaajiangteng/vite-app

@sapphi-red
Copy link
Member

For Vue JSX, you need to use plugin-vue-jsx.

import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(), vueJsx()],
});

@sapphi-red sapphi-red added invalid This doesn't seem right and removed needs reproduction labels Nov 8, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants