question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Asset in template is not fingerprinted in production

See original GitHub issue

Using current ember-cli-fastboot master.

If I have a template with an image, it refers to the unfingerprinted asset.

Input:

<img src="/assets/foo.png">

Output:

<img src="/assets/foo.png">

Expected:

<img src="/assets/foo-SomeHash.png">

See: topaxi.ch The puzzle.png image Or the repository: https://github.com/topaxi/topaxi.ch

Once the the page loads, the browser build correctly uses the fingerprinted asset.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jasonmitcommented, Mar 27, 2016

https://github.com/tildeio/ember-cli-fastboot/blob/master/lib/broccoli/fastboot-build.js#L35

buildFastBootTree only asset revs over the javascript tree, so it doesn’t take into account anything in the public tree which is why it misses foo.png.

I worked around this by including the full emberApp.proto.toArray sourceTree. That’s when I also uncovered that everything in the root of /public (robots.txt, crossdomain.xml, etc.) isn’t served up by the fastboot server.

Unsure how to resolve this without resolving the new bug I stumbled on.

0reactions
ballPointPenguincommented, May 28, 2016

not sure if this is the same issue, but I see 404s on my fingerprinted css and js assets despite the fact that the ember app is running correctly

UPDATE I just downgraded from node 6 to node 5 and the 404’s went away.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should assets referenced in templates be fingerprinted during ...
Should assets referenced in templates be fingerprinted during production ... my style paths are not correctly transformed during the production build, ...
Read more >
Rails asset paths missing fingerprint in production
We've just deployed a Rails 4.0.3 app to production and have found that asset paths generated by stylesheet_link_tag and javascript_link_tag ...
Read more >
Resolving fingerprinted assets using generateAssetMap
For production, I have Broccoli generate an assets map file assets/assetMap.json ... This template literal string will NOT have the css file ...
Read more >
Ember.js Lazy Assets: Fingerprinting & loading static/dynamic ...
The assetMap.json file itself is not fingerprinted. So the app will always use cached assetMap.json and not the latest asset map, ...
Read more >
Ruby on Rails Guides: Asset Pipeline
In production, an MD5 fingerprint is inserted into each filename so that the file ... This is not to say that assets can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found