html-webpack-plugin icon indicating copy to clipboard operation
html-webpack-plugin copied to clipboard

filename [contenthash] only . not adding to index.html

Open meghe2000 opened this issue 2 years ago • 4 comments

hi , It works well when I use ( filename: '.[contenthash].js' ) image

But when I write like this, it is not added to the index.html ( filename: '.[contenthash]' ) I want to use without the (.js)

image

meghe2000 avatar Mar 06 '22 00:03 meghe2000

right now only .js files are injected automatically

jantimon avatar Mar 06 '22 10:03 jantimon

right now only .js files are injected automatically

Do you have a solution for this personalization?

meghe2000 avatar Mar 06 '22 11:03 meghe2000

@meghe2000 Did you find a solution? I also need this for atomic deployments to CloudFront. The hashed index html filename can be used as DefaultRootObject once every assets in a website has been s3 sync-ed.

lestephane avatar Jan 19 '23 08:01 lestephane

The problem is here filename: '[name].[contenthash]', after generation files don't have .js, so html-webpack-plugin can't undestand is it JS or another file and so doesn't inject script tags

alexander-akait avatar Jun 21 '23 21:06 alexander-akait