Closed xc2 closed 5 months ago
This could be a useful feature, we can provide an Rsbuild plugin to implement it.
Can you share the detailed plugin API design? ❤️
This could be a useful feature, we can provide an Rsbuild plugin to implement it.
Can you share the detailed plugin API design? ❤️
I've just added an option example.
Look good to me 👍
How about maintain this plugin in a separate repo? Maybe create a new repo in https://github.com/rspack-contrib.
I hope to reduce the complexity of the Rsbuild repo and hand over more non-core plugins over to the community for maintenance.
Look good to me 👍
How about maintain this plugin in a separate repo? Maybe create a new repo in https://github.com/rspack-contrib.
I hope to reduce the complexity of the Rsbuild repo and hand over more non-core plugins over to the community for maintenance.
absolutely
You can give me a repo name when you are going to start the work, I will create the repo and add admin role for you. 😄
I will move this issue to discussion, as this feature will be supported by a separate Rsbuild plugin.
What problem does this feature solve?
when one is setup a web app build with
externals
in it, 90% of those will typically also inject<script>
or<link>
of these external libraries into html - sometimes a set of unpkg urls, sometimes the file urls inside the public directory.in some setup, the developer would config
externals
only for production mode.The most common thing is: when bump up a dependency of this web app, most of developers bump only the dependency entity in
package.json
and forget the link in html.I previously use my own version of html-webpack-deploy-plugin to achieve it. I think rsbuild could support this feature.
pros of html-webpack-deploy-plugin:
cons:
externals
by handWhat does the proposed API look like?
An example option:
It looks very like html-webpack-deploy-plugin.