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

hashed names not generated for main entries - Investigate to use hashes by default #14

Open
offtherailz opened this issue Oct 6, 2021 · 4 comments

Comments

@offtherailz
Copy link
Member

offtherailz commented Oct 6, 2021

When creating entries, to avoid cache issues, by default, where not specified in a different way, we should use cache.

const apps = readEntriesPaths(appsPaths, ({ dirName, baseName, entryName }) => ({

In html template instead, we could use something like html-webpack-injector-plugin to simplify the injection of the correct entry (chunk), automatically using the correct (hashed) file-name

I should instead ask to specify the file-name in config, if one specific name is required.

@offtherailz
Copy link
Member Author

what do you thing @allyoucanmap ?

@offtherailz offtherailz changed the title Investigate to use hashes by default hashed names not generated for main entries - Investigate to use hashes by default Oct 6, 2021
@allyoucanmap
Copy link
Contributor

@offtherailz

there is this other solutions where you can use version property in the index.ejs

https://github.com/geosolutions-it/mapstore-project/blob/master/types/framework/templates/index.ejs#L12

@allyoucanmap
Copy link
Contributor

@offtherailz anyway I thought it depends from the buildConfig.js in mapstore https://github.com/geosolutions-it/MapStore2/blob/master/build/buildConfig.js#L126

@offtherailz
Copy link
Member Author

offtherailz commented Oct 6, 2021

thanks for the solution, it will help me with my current project. Anyway you understand that "trying to guess the name" is not a stable solution. (e.g. if you have many pages and bundles, or short names that can cause false positive). An hashed file is also better digested by server side caches that passing v= may be confused and not able to cache

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

No branches or pull requests

2 participants