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

Couldn't recognize webpack module federation modules #877

Open
yuzheng14 opened this issue Jan 22, 2024 · 0 comments
Open

Couldn't recognize webpack module federation modules #877

yuzheng14 opened this issue Jan 22, 2024 · 0 comments
Labels

Comments

@yuzheng14
Copy link

Bug Description

When use the webpack@5 Module Federation plugin, some modules are loaded remotely. However depcheck fails to recognize these remote module and incorrectly reports them as missing dependencies.

Code snippets

The vue.config.js with Module Federation Plugin might look like this

// vue.config.js
import { ModuleFederationPlugin } from 'webpack'

export default defineConfig({
  configureWebpack: {
    plugins: [ new ModuleFederationPlugin({
      remotes: {
        example: '<remote entry path>'
      })
    ],
  },
})

Usage in a file:

// ./src/main.js
import Example from 'example'

Running depcheck under this setup flags example as a missing dependency.

Extra info

Refer to the official Webpack Module Federation plugin documentation.

@yuzheng14 yuzheng14 added the bug label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant