Skip to content

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

@muuvmuuv

Description

@muuvmuuv

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions