jantimon / jantimon/html-webpack-harddisk-plugin

Package types do not work with webpack 5

Open
#48 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
224
Forks
37
PR merge metrics
No merged PRs in 30d

Description

I'm currently in the middle of upgrading to webpack 5 and this package is now giving me a type error:

```
node_modules/.pnpm/html-webpack-harddisk-plugin@2.0.0_567a27a819cc7a6a0873c1471c083c1f/node_modules/html-webpack-harddisk-plugin/index.d.ts:1:10 - error TS2305: Module '"../../../../webpack/types"' has no exported member 'Plugin'.

1 import { Plugin } from 'webpack';
~~~~~~
```

The problem is here: https://github.com/jantimon/html-webpack-harddisk-plugin/blob/main/index.d.ts#L1

I believe `Plugin` is no longer a valid export from webpack. Maybe you need to switch to `WebpackPluginInstance` instead?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with index.d.ts at the import on line 1 and compare its Plugin reference with the webpack 5 type exports shown by the reported error. Update the package declaration so TypeScript accepts it during a webpack 5 upgrade, then verify that the reported type error no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.