Comments (7)
You should be able to use the repo url (including the branch) in place of the version string in package.json
from webapp-webpack-plugin.
Hey @brunocodutra can confirm it works flawlessly for me!
It generates the icons and it inject them correctly using the alpha version of html-webpack-plugin
from webapp-webpack-plugin.
The html-webpack-plugin is already following a webpack recommendation to increase the hook performance:
webpack/webpack#7673
webpack/webpack#7672
A static version property was added for direct access:
https://github.com/jantimon/html-webpack-plugin/blob/d65b37d2c588047e0d81a38f4645fcdb3ead0b9e/index.js#L915-L927
The new event name and timing can be seen in this chart:
However as the html-webpack-plugin is an optional dependency you will probably need some "optional require" like the webpack-subresource-integrity plugin did:
Could you please give the new events a try and let me know if they work for your case?
https://github.com/jantimon/html-webpack-plugin/tree/webpack-4#events
beforeAssetTagGeneration
hook
AsyncSeriesWaterfallHook<{
assets: {
publicPath: string,
js: Array<{string}>,
css: Array<{string}>,
favicon?: string | undefined,
manifest?: string | undefined
},
outputName: string,
plugin: HtmlWebpackPlugin
}>
alterAssetTags
hook
AsyncSeriesWaterfallHook<{
assetTags: {
scripts: Array<HtmlTagObject>,
styles: Array<HtmlTagObject>,
meta: Array<HtmlTagObject>,
},
outputName: string,
plugin: HtmlWebpackPlugin
}>
alterAssetTagGroups
hook
AsyncSeriesWaterfallHook<{
headTags: Array<HtmlTagObject | HtmlTagObject>,
bodyTags: Array<HtmlTagObject | HtmlTagObject>,
outputName: string,
plugin: HtmlWebpackPlugin
}>
afterTemplateExecution
hook
AsyncSeriesWaterfallHook<{
html: string,
headTags: Array<HtmlTagObject | HtmlTagObject>,
bodyTags: Array<HtmlTagObject | HtmlTagObject>,
outputName: string,
plugin: HtmlWebpackPlugin,
}>
beforeEmit
hook
AsyncSeriesWaterfallHook<{
html: string,
outputName: string,
plugin: HtmlWebpackPlugin,
}>
afterEmit
hook
AsyncSeriesWaterfallHook<{
outputName: string,
plugin: HtmlWebpackPlugin
}>
from webapp-webpack-plugin.
@jantimon Thanks a lot for the pointers
@aaronjensen This is definitely on my radar, it's just a matter of finding time to do it
Actually t wasn't too hard, so I went ahead and added support to v4 already. Do you think you could check whether #131 works for you and let me know before I merge it?
from webapp-webpack-plugin.
Hey @brunocodutra any news on this? Any way I can help?
I'd love to use this plugin with html-webpack-plugin@next
!
from webapp-webpack-plugin.
PR #131adds support for it, do you think you could test it and let me know if it works for you?
from webapp-webpack-plugin.
Sure! Do I need to build the project or I can just drop-in replace it in the node_modules
?
from webapp-webpack-plugin.
Related Issues (20)
- allow outputted file name to include prefix HOT 1
- Cache hash should depend on Favicons version HOT 4
- Build fails when html-webpack-plugin is not installed HOT 1
- Convenient way to get generated html tags from js HOT 7
- Add hash as query string HOT 4
- Support xhtml flag HOT 3
- Apple - larger resolutions not being generated HOT 6
- Exclamation mark in `favicons` property value makes the build crash HOT 3
- Allow logo option to be an array HOT 1
- Make this work with mini-html-webpack-plugin? HOT 1
- Gray border around png shapes HOT 1
- favicon outside of assets folder HOT 7
- Please Delete HOT 2
- Multiple icons sources? HOT 6
- Update favicons dependency to v5.4.0 HOT 3
- Deprecated media attribute
- Add feature to configure filenames to append hash HOT 7
- Not inject to html HOT 14
- An in-range update of webpack is breaking the build 🚨 HOT 7
- Intermittent Error with sharp dep HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webapp-webpack-plugin.