Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type doesn't match built output #86

Open
fa93hws opened this issue May 24, 2021 · 1 comment
Open

Type doesn't match built output #86

fa93hws opened this issue May 24, 2021 · 1 comment

Comments

@fa93hws
Copy link

fa93hws commented May 24, 2021

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'
@junalmeida
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants