Open
Description
Describe the bug
The types are messed up
- Type errors
- Exporting the wrong type
IEntriesOption
is missing
Following the types, usage should be like this, but its invalid:
import { ExtensionReloader } from 'webpack-ext-reloader'
And when using it the other way, typescript 'throws' an error at runtime, so I need to do this:
new (ExtensionReloader as any)({
port: 8080,
reloadPage: true,
manifest: Path.resolve('dist', 'manifest.json'),
entries: {
background: 'background',
extensionPage: 'dashboard'
}
})
This is a concrete bug in this project, but also this webpack plugin simply does not work. But I have no clue why. Is my config wrong perhaps? Or do I need to run a server of some sort or use this mysterious 8080 port elsewhere?
I particularily want to hotreload extension pages that use React.
Thanks for the clarification
To Reproduce
Use webpack with Typescript.
npx webpack --watch --config webpack.dev.ts
Config
export default const config = {
mode: 'development',
...
plugins: [
...
new (ExtensionReloader as any)({
port: 8080,
reloadPage: true,
manifest: Path.resolve('dist', 'manifest.json'),
entries: {
background: 'background',
extensionPage: 'dashboard'
}
})
]
}
Environment:
- OS: Windows 11
- Browser Version: Version 1.77.95 Chromium: 135.0.7049.52 (Official Build) (arm64)
- webpack Version:
5.91.0
- webpack-ext-reloader Version:
1.1.13
I'm going to open a PR
- yes
- no