Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
meghe2000 opened this issue Mar 6, 2022 · 4 comments
Open

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

meghe2000 opened this issue Mar 6, 2022 · 4 comments

Comments

@meghe2000
Copy link

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

@jantimon
Copy link
Owner

jantimon commented Mar 6, 2022

right now only .js files are injected automatically

@meghe2000
Copy link
Author

right now only .js files are injected automatically

Do you have a solution for this personalization?

@lestephane
Copy link

@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.

Repository owner deleted a comment from webdiscus Jun 20, 2023
@alexander-akait
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants