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

fix: include regex #347

Merged
merged 4 commits into from Apr 28, 2023
Merged

fix: include regex #347

merged 4 commits into from Apr 28, 2023

Conversation

kekexunxun
Copy link
Contributor

Description

Improve auto import for project with @vue/cli-service@5 with Vue3.

I used unplugin-vue-define-options@1.3.3 in my project, and I need to specific the include option in my vue.config.js file.

UnpluginDefineOptions({ version: 3, include: [/\.setup\.[cm]?[jt]sx?$/, /\.vue$/, /\.vue\?vue&/] })

Just remove original Vue version 2 limited to include origin reg REGEX_VUE_SUB as default can solve this problem.

Linked Issues

close #327

Additional context

Reproduction link https://stackblitz.com/edit/vitejs-vite-drvu4g?file=src/App.vue

@stackblitz
Copy link

stackblitz bot commented Apr 26, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@changeset-bot
Copy link

changeset-bot bot commented Apr 26, 2023

🦋 Changeset detected

Latest commit: 949934c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
unplugin-vue-define-options Patch
@vue-macros/better-define Patch
@vue-macros/common Patch
@vue-macros/define-emit Patch
@vue-macros/define-models Patch
@vue-macros/define-prop Patch
@vue-macros/define-props-refs Patch
@vue-macros/define-props Patch
@vue-macros/define-slots Patch
@vue-macros/export-props Patch
@vue-macros/hoist-static Patch
@vue-macros/reactivity-transform Patch
unplugin-vue-macros Patch
@vue-macros/api Patch
@vue-macros/define-render Patch
@vue-macros/named-template Patch
@vue-macros/nuxt Patch
@vue-macros/setup-block Patch
@vue-macros/setup-component Patch
@vue-macros/setup-sfc Patch
@vue-macros/short-emits Patch
@vue-macros/short-vmodel Patch
@vue-macros/volar Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel vercel bot temporarily deployed to Preview – unplugin-vue-macros-coverage April 26, 2023 05:58 Inactive
@vercel vercel bot temporarily deployed to Preview – unplugin-vue-macros April 26, 2023 05:59 Inactive
@vercel vercel bot temporarily deployed to Preview – unplugin-vue-macros-coverage April 26, 2023 06:18 Inactive
@vercel vercel bot temporarily deployed to Preview – unplugin-vue-macros April 26, 2023 06:19 Inactive
@vercel vercel bot temporarily deployed to Preview – unplugin-vue-macros April 28, 2023 01:07 Inactive
@vercel vercel bot temporarily deployed to Preview – unplugin-vue-macros-coverage April 28, 2023 01:08 Inactive
@vercel vercel bot temporarily deployed to Preview – unplugin-vue-macros-coverage April 28, 2023 01:11 Inactive
@sxzz sxzz enabled auto-merge (squash) April 28, 2023 01:11
@sxzz sxzz changed the title fix: auto import not work in vue3 with webpack fix: include regex Apr 28, 2023
@vercel vercel bot temporarily deployed to Preview – unplugin-vue-macros April 28, 2023 01:11 Inactive
@sxzz sxzz merged commit 3dabd96 into vue-macros:main Apr 28, 2023
9 checks passed
@github-actions github-actions bot mentioned this pull request Apr 28, 2023
sxzz added a commit that referenced this pull request Nov 28, 2023
revert #347, but remove `version === 2`
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

Successfully merging this pull request may close these issues.

defineOptions Not work when using webpack with Vue3
2 participants