I cannot figure out the type of the webpack configuring function when the config is written in TypeScript.
Currently I export an object whose type is Configuration:
const config: Configuration = {
mode: 'production',
// ...
}
export default config;
which should be changed to exporting a function:
export default (...): ... => {
return {
mode: 'production'
// ...
}
}
but I don't know the proper type of that function and cannot find it among the type definitions:
https://github.com/webpack/webpack/blob/main/types.d.ts
Any ideas?