Extra ./dist on asset files in prod
See original GitHub issueHopefully this will help someone. Or maybe someone can tell what I was doing wrong to begin with. I have custom font files that were loading fine in dev. In prod, however, styles.css was looking for the font files in:
dist/dist/fontfilename.woff
Changing this line:
to
'publicPath: '',
fixed the problem.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:7
Top Results From Across the Web
Copy content of assets folder to target dist · Issue #320 - GitHub
Files unknown for typescript compiler, assets file should be copied during build. My custom middleware is processing files, which are not ...
Read more >How to include custom files with angular-cli build?
How do I tell angular-cli to include a file from "src/assets" in the root of "dist" when it builds? We deploy to a...
Read more >Angular CLI: Different ways to include assets - Łukasz Nojek
Just add files to the assets folder and refer to them using ... the asset will go to app/component1/assets folder in the dist...
Read more >What is an Asset Directory? - Asset Directories & File Storage
Sometimes, a file is just a file, and ProGet asset directories ... Files and Sub-folders can have additional metadata stored in ProGet.
Read more >Static Asset Handling - Vite
Referenced assets are included as part of the build assets graph, will get hashed file names, and can be processed by plugins for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I get the same issue in production if I make use of an
app.global.scss(SASS) file, but not when I use anapp.global.cssfile.webpack.config.renderer.prod.babel.jshas the following loader configuration for theglobal.cssrule:But for the
global.scssrule it is:In other words, the global SASS rule is missing the
publicPathoption. After adding the samepublicPathoption to theglobal.scssrule, the issue was resolved for me.@W1M0R you saved my day, thanks a lot!