vuetify-nuxt-module build behind proxy
An environment where nuxt project has trying to build does stand behind the proxy.
In building process i got issues whith fetching google fonts (connection timeout).
How to avoid fonts fetching or how to tune nuxt environment use proxy?
4 Replies
Hi @Predator. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To avoid issues with fetching Google Fonts during the build process behind a proxy in a Nuxt project (including when using the vuetify-nuxt-module), you have two main options based on the knowledge sources:
1. Download Fonts Locally Using a Nuxt Module
Instead of fetching Google Fonts at build/runtime, you can use the
If you still need to fetch resources through a proxy, you must configure your build environment (not Nuxt itself) to use the proxy. This typically involves setting environment variables like
The recommended solution is to use the
Instead of fetching Google Fonts at build/runtime, you can use the
@nuxtjs/google-fonts module with the download: true option. This will download the fonts during the build and serve them locally, avoiding the need to fetch them from Google during the build or at runtime. Example configuration:
This approach is highlighted as a best practice for environments with restricted internet access or proxy requirements, as it eliminates the need for external font fetching during the build process Nuxt 3 + SASS: Can't use include paths with @import and @use.
2. Configure Proxy for Build EnvironmentIf you still need to fetch resources through a proxy, you must configure your build environment (not Nuxt itself) to use the proxy. This typically involves setting environment variables like
HTTP_PROXY and HTTPS_PROXY before running the build. However, the knowledge sources do not provide explicit Nuxt-specific instructions for proxying external requests during the build.
Summary:The recommended solution is to use the
@nuxtjs/google-fonts module with download: true to avoid fetching fonts from Google during the build. If you must use a proxy, configure your environment accordingly, but note that the knowledge sources do not provide detailed steps for this within Nuxt itself.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@382383501271629827> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Sorry for "theater screen", have not access to discord from PC.

https://nodejs.org/api/cli.html#environment-variables
note this link