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

Type 'LicenseWebpackPlugin' is not assignable to type 'WebpackPluginInstance'. #115

Open
muuvmuuv opened this issue Jan 17, 2022 · 0 comments
Assignees

Comments

@muuvmuuv
Copy link

Our webpack typescript config is throwing the below with this lib. Is it webpack 5 ready yet, or is it just because webpack types aren't used in the lib?

(alias) new LicenseWebpackPlugin(pluginOptions?: PluginOptions): LicenseWebpackPlugin
import LicenseWebpackPlugin
Argument of type 'LicenseWebpackPlugin' is not assignable to parameter of type '((this: Compiler, compiler: Compiler) => void) | WebpackPluginInstance'.
  Type 'LicenseWebpackPlugin' is not assignable to type 'WebpackPluginInstance'.
    Types of property 'apply' are incompatible.
      Type '(compiler: WebpackCompiler) => void' is not assignable to type '(compiler: Compiler) => void'.
        Types of parameters 'compiler' and 'compiler' are incompatible.
          Type 'Compiler' is not assignable to type 'WebpackCompiler'.
            The types of 'hooks.thisCompilation.tap' are incompatible between these types.
              Type '(options: string | (TapOptions & { name: string; }), fn: (args_0: Compilation, args_1: CompilationParams) => void) => void' is not assignable to type '(pluginName: string, handler: (compilation: WebpackCompilation) => void) => void'.
                Types of parameters 'fn' and 'handler' are incompatible.
                  Types of parameters 'compilation' and 'args_0' are incompatible.
                    Type 'Compilation' is not assignable to type 'WebpackCompilation'.
                      Property 'hash' is optional in type 'Compilation' but required in type 'WebpackCompilation'.ts(2345)
@xz64 xz64 self-assigned this Jan 22, 2022
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

No branches or pull requests

2 participants