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

No hash identifier for scripts and styles #230

Open
talyguryn opened this issue Aug 26, 2022 · 1 comment
Open

No hash identifier for scripts and styles #230

talyguryn opened this issue Aug 26, 2022 · 1 comment
Assignees
Labels
bug Something isn't working good first issue Good for newcomers Priority: High

Comments

@talyguryn
Copy link
Member

Browser cached these files and requires to empty cache

image

@talyguryn talyguryn added the bug Something isn't working label Aug 26, 2022
@talyguryn
Copy link
Member Author

Same problem fixed in Hawk 1.0 the following way for Webpack builder and Twig engine.

  1. Save webpack build hash to the separate config file
    https://github.com/codex-team/hawk/blob/master/hawk/webpack.config.js#L75-L87

  2. Read this file while app is loading and set the template variable
    https://github.com/codex-team/hawk/blob/master/hawk/app.js#L156-L167

  3. Add the hash identifier to layout template
    https://github.com/codex-team/hawk/blob/master/hawk/views/layout.twig#L11

@Y-k-Y Y-k-Y self-assigned this Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers Priority: High
Projects
No open projects
Status: On review
Development

No branches or pull requests

3 participants