Skip to content

fix: remove vue$ alias to support dependencies with different Vue version #672

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

Merged
merged 1 commit into from
May 9, 2025

Conversation

ShGKme
Copy link
Collaborator

@ShGKme ShGKme commented May 9, 2025

Adding alias like 'vue$': path.resolve('./node_modules/vue') breaks the expected module resolution.
Different dependencies may have different Vue versions, and this is fine.

This will lead to duplicate Vue dependency with npm link as said in the comment.

But npm link shouldn't be used in such scenarios (where dependency resolution is important). It acts very different from an actual installation:

  • Only supports a single Vue version
  • Doesn't cover other dependencies like vue-router or @vueuse/core
  • Doesn't cover correct dependency resolution or other dependencies, overrides and etc.

Alternatives:

  • npm pack + npm install for one time clean installation testing (without watch)
  • Setting up monopero for a full-featured environment with all the dependencies for a good DX with watch mode

Signed-off-by: Grigorii K. Shartsev <[email protected]>
@ShGKme ShGKme requested review from st3iny and susnux May 9, 2025 18:26
@ShGKme ShGKme self-assigned this May 9, 2025
@ShGKme ShGKme added bug Something isn't working 3. to review labels May 9, 2025
@ShGKme ShGKme changed the title fix: remove vue$ alias fix: remove vue$ alias to support dependencies with different Vue version May 9, 2025
Copy link
Contributor

@st3iny st3iny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@st3iny st3iny merged commit c1dd9ca into main May 9, 2025
6 checks passed
@st3iny st3iny deleted the fix/vue-alias branch May 9, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants