webpackbar icon indicating copy to clipboard operation
webpackbar copied to clipboard

Type doesn't match built output

Open fa93hws opened this issue 3 years ago • 1 comments

In the built dist we have

module.exports = WebpackBarPlugin;

in webpackbar.js, which means it should be imported as

import * as WebpackBar from 'webpackbar';

However, in generated type, it is declared as

export default WebpackBarPlugin;

which assumes it is imported as

import Webpackbar from 'webpackbar'

fa93hws avatar May 24 '21 11:05 fa93hws

I have: import WebpackBar from "webpackbar"; And then: new WebpackBar()

When I run it I get: [webpack-cli] TypeError: WebpackBar.default is not a constructor

junalmeida avatar Nov 16 '22 16:11 junalmeida