How to serve static files like .ico
or .js
?
I tried to create a static
folder in my theme but it didn’t work when I used html tags like <link rel="icon" href="/static/favicon.ico" />
Hi @baktiaditya
Welcome to the Frontity community.
See this thread, and in particular this answer, this answer and this answer which may guide you toward a solution. In short, you should import the static file into a React component and use it there.
hi, thanks for the reply.
i solved it using custom webpack configuration based on this thread Customize Webpack configuration
and i think you guys can consider adding support for .ico
files in here:
Sure, that’d be great. Could you please submit a PR for that?
1 Like