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: webpack-uni-mp-loader should support nested node_modules #4506

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

yangyuanxx
Copy link

@yangyuanxx yangyuanxx commented Aug 29, 2023

When webpack-uni-mp-loader call restoreNodeModules to restore the modulePath, it should support nested node_modules folder structure. e.g:

mp-alipay
|-- node-modules <-- first one
  |-- npm-scope-ali
    |-- ui-uniapp
      |-- node-modules <-- another nested one
        |-- @ali
          |-- primitive-uniapp

Before fixed:

restoreNodeModules returns: "node_modules/@ali/ui-uniapp/node-modules/@ali/primitive-uniapp"
(ATTENTION to the second node-modules, it should be node_modules)

After fixed:

restoreNodeModules returns: "node_modules/@ali/ui-uniapp/node_modules/@ali/primitive-uniapp"
(ATTENTION to the second node_modules, it is correct now)

@GRCmade GRCmade deleted the branch dcloudio:dev August 22, 2024 13:09
@GRCmade GRCmade closed this Aug 22, 2024
@GRCmade GRCmade reopened this Aug 28, 2024
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.

2 participants