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

unplugin-vue-define-options SyntaxError: defineOptions() please use defineProps or defineEmits instead. #19

Closed
yulei521 opened this issue Apr 11, 2022 · 1 comment

Comments

@yulei521
Copy link

yulei521 commented Apr 11, 2022

import { rollup } from 'rollup'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import DefineOptions from 'unplugin-vue-define-options/rollup'

...

const bundle = await rollup({
   ...
   plugins: [
      DefineOptions(),
      vue({
        isProduction: false,
      }),
      vueJsx(),
      ...
   ]
   ...
})
@sxzz
Copy link
Member

sxzz commented Apr 11, 2022

You can't use props or emits with defineOptions, because it conflicts with defineProps or defineEmits

There's an error example here
https://github.com/sxzz/unplugin-vue-define-options/blob/67670dcb83330c0125675e2b2a25de496136a639/tests/fixtures/error4.vue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants