Sotorin
Fonts not included
I hit a small snag trying to build my Phoenix app with Webpack, namely fonts are not included by the app.
-
I have clean Webpack build - copies whole bunch of fonts, one JS file with embedded CSS. After the build all the font files are are placed in /web/priv/static/fonts/ directory and my JS file ends up in /web/priv/static/js/
-
During the build only the fonts which my CSS file is actually referencing are copied/extracted (which is what I’d expect),
-
So far all the styles from my CSS file work as expected, however I’m getting errors when trying to use styles which reference these fonts. I looked in Chrome and I don’t see fonts directory in the tree
-
Fonts are present in /web/priv/static/fonts - they should be served and they are not. Of course my endpoint is configured to serve fonts.
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #performance













First 3 of 3 Posts
dsissitka
I believe
priv/staticmight be the directory you’re looking for, notweb/priv/static.Sotorin
Hell yes! That worked, thank you:)
OvermindDL1
Also for anyone else reading this, when you add a new directory in
priv/staticthat you want exposed to the web, be sure to add it to thePlug.Staticconfig in yourendpoint.exfile.