Giter Club home page Giter Club logo

Comments (5)

addyosmani avatar addyosmani commented on June 3, 2024

Thanks for the valuable input, @jantimon. Still getting with hang of what are idiomatic best practices for Webpack plugins :)

https://github.com/jantimon/resource-hints-webpack-plugin/blob/master/index.js#L87-L89 feels a lot cleaner than the approach we're currently using here. I'm in favor of switching to it.

https://github.com/jantimon/resource-hints-webpack-plugin/blob/master/index.js#L55 appears to be where you're merging html-webpack-plugin's options with custom ones. I see no reason not to switch over to doing something similar there. I hadn't considered the multiple instance usecase but appreciate the tips!

from preload-webpack-plugin.

jantimon avatar jantimon commented on June 3, 2024

@addyosmani cool 👍 for the html-webpack-plugin 3 version there will be an api to create custom tag elements:

https://github.com/jantimon/html-webpack-plugin/blob/version-3.x/lib/html-tags.js#L28

Maybe we will also backport it to the 2.x branch

I am always happy for feedback from plugin authors on the events and options - so if something feels to complicated please let me know

from preload-webpack-plugin.

bekos avatar bekos commented on June 3, 2024

@addyosmani We can actually keep the current API as the default options for every hmtl-webpack-plugin instance, and each instance can override them if required. One thing to consider moving options into html-webpack-plugin is naming conflicts with other plugins.

from preload-webpack-plugin.

addyosmani avatar addyosmani commented on June 3, 2024

@bekos

We can actually keep the current API as the default options for every hmtl-webpack-plugin instance, and each instance can override them if required.

That sounds pretty reasonable to me as well.

cool 👍 for the html-webpack-plugin 3 version there will be an api to create custom tag elements:

@jantimon Oh that's totally rad. Thanks for sharing that insight. I'd be interested in it being backported, but don't want to add too much to your workload - is V3's api surface vastly different?

from preload-webpack-plugin.

jantimon avatar jantimon commented on June 3, 2024

The tag structure is compatible with the current html-webpack-plugin version. The main idea behind 3.x is to get closer to the webpack 2.x internals and that causes some breaking changes but we try to introduce as few api changes as possible. Your plugin shouldn't be affected at all.

from preload-webpack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.