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

feat: expose multiple constructors #52

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

moonray
Copy link

@moonray moonray commented Sep 26, 2018

Resolves #50

Copy link
Collaborator

@aulisius aulisius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good work @moonray !. Thanks for sending a PR :D. Have added a couple of changes. Apart from these, we'd also have to update the README.

cc @mastilver.


import DynamicCdnWebpackPlugin, {pluginName} from './dynamic-cdn-webpack-plugin';

export default class HtmlDynamicCdnWebpackPlugin extends DynamicCdnWebpackPlugin {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I feel there is no need to export this as default. We are renaming the exports in src/index.js, so might as well do a named export

}
};

export default class DynamicCdnWebpackPlugin {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing about default exports

});
}
}
export {default as HtmlDynamicCdnWebpackPlugin} from './html-dynamic-cdn-webpack-plugin';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we remove the default export, we can just do something like

export * from './html-dynamic-cdn-webpack-plugin';

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

Successfully merging this pull request may close these issues.

None yet

2 participants