Skip to content

[Bug]: unplugin-vue-define-options is not available #4678

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

Closed
coderwyd opened this issue Feb 28, 2025 · 7 comments
Closed

[Bug]: unplugin-vue-define-options is not available #4678

coderwyd opened this issue Feb 28, 2025 · 7 comments

Comments

@coderwyd
Copy link

coderwyd commented Feb 28, 2025

Version

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
    Memory: 3.83 GB / 31.72 GB
  Browsers:
    Edge: Chromium (127.0.2651.105)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @rsbuild/core: ^1.2.12 => 1.2.12 
    @rsbuild/plugin-vue2: ^1.0.2 => 1.0.2

Details

When I upgrade @rsbuild/core to 1.2.12 defineOptions cannot be used, fallback to 1.2.11 everything works fine.

Image

Reproduce link

https://github.com/coderwyd/rsbuild-repo

Reproduce Steps

bun install && bun run dev

@sxzz
Copy link

sxzz commented Feb 28, 2025

Maybe relate to unplugin/unplugin-vue-components#829
Try to disable experimentalInlineMatchResource for now.

sxzz added a commit to vue-macros/vue-macros that referenced this issue Mar 4, 2025
@sxzz
Copy link

sxzz commented Mar 4, 2025

Fixed on the Vue Macros side. This issue can be closed.

@chenjiahan
Copy link
Member

Nice bro 👍

@sxzz
Copy link

sxzz commented Mar 4, 2025

Released as v3.0.0-beta.2

@curlykay
Copy link

curlykay commented Mar 9, 2025

Hi sxzz and team,

Apologies for commenting on a closed issue, however, as a user currently constrained to Vue 2.7 due to various reasons, I’d like to kindly ask a related question.

First, thank you again for addressing the defineOptions issue in Vue Macros v3.0.0-beta.2! 🌟

We’re currently using Vue 2.7 with @vue-macros/[email protected] + unplugin-vue-define-options. Since Vue Macros 3.0+ drops Vue 2.7 support, we need to keep experimentalInlineMatchResource: false in vue-loader option for now.

Is there a plan to backport the fix (related to experimentalInlineMatchResource) to the Vue 2.7-compatible @vue-macros/[email protected] versions? Alternatively, could you advise on a sustainable configuration for Vue 2.7 projects using rsbuild and Vue Macros’ legacy versions?

We’d appreciate any guidance to ensure compatibility without blocking rsbuild upgrades. Thanks for your time and efforts! 🙌

rsbuild still supports Vue 2.7, so a backward-compatible fix would greatly help the Vue 2.7 community.

Current workaround: Disabling experimentalInlineMatchResource works, but we aim for a long-term solution.

(Feel free to close this thread if a new issue is preferred for further discussion!)

@sxzz
Copy link

sxzz commented Mar 9, 2025

I understand your situation, but the issue is that our community can’t support Vue 2 indefinitely. This is why libraries like Pinia and VueUse have gradually dropped support for Vue 2.

However, the problem still needs to be addressed. Here are a few recommended solutions:

  1. As you mentioned, disable experimentalInlineMatchResource.
  2. Use the patch-package / yarn / pnpm patch feature and apply the fix from this commit to resolve the issue yourself.
  3. Consider Vue Macros’ paid support plan for Vue 2 as an option.

We might consider backporting support after the v3 version stabilizes.

@curlykay
Copy link

curlykay commented Mar 9, 2025

patch-package! I hadn't considered that, thank you for your recommended solutions!

I fully understand and respect your support policy for Vue 2. It is definitely well-considered and reasonable. At the same time, I look forward to your good news.

Finally, I am still sorry for continuing to comment in the closed issue and thank you very much for your detailed and serious reply.

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

4 participants