question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Propostion] New API to instantiate plugin for diff supported output plugin

See original GitHub issue

I really hate this code: https://github.com/mastilver/dynamic-cdn-webpack-plugin/blob/ba58d17d891a9e0db4d7dd2cca43f7b75ca8baa1/src/index.js#L51-L57

It’s working but for the user it can be very surprising and I don’t think it can be extended extensively to handle different output plugin (like #31 )

I think a better API would be to expose multiple constructor like (better name ?):

  • DynamicCdnWebpackPlugin
  • DynamicCdnWebpackPLuginForHtmlPlugin
  • DynamicCdnWebpackPluginForAssetsPlugin

DynamicCdnWebpackPLuginForHtmlPlugin would extend DynamicCdnWebpackPLugin and would override the output function

@aulisius What do you think? Do you have any other suggestion?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
aulisiuscommented, Sep 14, 2018

The names are giving me Java nightmares O_O.

HtmlDynamicCdnWebpackPlugin

I’m cool with this because it’s the shortest but like is mentioning Webpack really necessary? The package name already has webpack on it, so we could drop Webpack in the constructor.

1reaction
aulisiuscommented, Sep 5, 2018

I concur with the fact that we shouldn’t be exposing webpack internals to users. Cool, let’s go with the multiple classes approach then. I am okay with inheritance to a certain degree 😛

Read more comments on GitHub >

github_iconTop Results From Across the Web

A vue code diff display plugin, support Vue2 / Vue3 - GitHub
VCodeDiff. A code diff display plugin, available for Vue2 / Vue3. It is the vue3 version of vue-code-diff, refer to a lot of...
Read more >
How to Write Output Plugin - Fluentd
Extend Fluent::Plugin::Output class and implement its methods. # and identifies the plugin in the configuration file. # Enable threads if you are writing...
Read more >
October 2022 - Visual Studio Code
Learn what is new in the Visual Studio Code October 2022 Release (1.73)
Read more >
Artifactory REST API - JFrog - JFrog Documentation
Description: Promotes a Docker image from one repository to another. Supported by local repositories only. Since: 3.7. Notes: Requires JFrog Container Registry ...
Read more >
Updating the Amazon VPC CNI plugin for Kubernetes add-on
The plugin is fully supported for use on Amazon EKS and self-managed Kubernetes clusters on AWS. Recommended version of the Amazon VPC CNI...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found