tsconfig-paths-webpack-plugin
tsconfig-paths-webpack-plugin copied to clipboard
strange index import/exports result to improper commonjs type definition exports
currently it's not possible to properly import this plugin via commonjs within .js file when checkJs:true because generated type definitions provide wrong ambient export
instead of

we should get

So this will compile without any errors within webpack.config.js
// @ts-check
const TsconfigPathsPlugin = /** @type {any} */ (require('tsconfig-paths-webpack-plugin'))
// ....
{
plugins: [new TsconfigPathsPlugin()],
}
I mean you cannot use import {} from '...' within webpack ( nodejs ) but if you're writing plugins etc in TypeScript import is gonna be supported as TS understands export = TsconfigPathsPlugin
Current Behaviour:
