Skip to content

use ModuleFederationPlugin of @module-federation/enhanced/webpack in vue-cli@5 project error #3440

Open
@functionwell

Description

Describe the bug

install devDependencies "@module-federation/enhanced": "^0.8.8"

npm run serve

Error: node_modules/@module-federation/enhanced/dist/src/lib/container/runtime/FederationModulesPlugin.js:21
addContainerEntryModule: new tapable_1.SyncHook(['dependency']),
^

TypeError: tapable_1.SyncHook is not a constructor

tapable is not list in @module-federation/enhanced's peerDependencies, even install [email protected] in vue-cli@5 project, got build error

Reproduction

https://stackblitz.com/edit/vitejs-vite-jupwmuvt?file=vue.config.js

Used Package Manager

npm

System Info

System:
    OS: Linux 5.15 Ubuntu 20.04 LTS (Focal Fossa)
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-12450H
    Memory: 2.28 GB / 7.62 GB
    Container: Yes
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 16.20.2 - ~/.nvm/versions/node/v16.20.2/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.20.2/bin/yarn
    npm: 8.19.4 - ~/.nvm/versions/node/v16.20.2/bin/npm

no Browsers in WSL

Validations

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions