Skip to content

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 <me@shgk.me>
@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
@ShGKme ShGKme mentioned this pull request Oct 25, 2025
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.

4 participants