-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.js
More file actions
103 lines (101 loc) · 2.6 KB
/
nuxt.config.js
File metadata and controls
103 lines (101 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
require("dotenv").config();
const APP_TITLE = "Nuxt.js Template";
module.exports = {
server: {
host: "0.0.0.0" // Allow to connect other devices on the local network
},
target: "static",
components: true,
/*
** Headers of the page
*/
head: {
// Only headers common to all pages and all languages.
// The others are defined in the layout component.
meta: [{ charset: "utf-8" }, { name: "viewport", content: "width=device-width, initial-scale=1" }],
link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }]
},
/*
** Environment variables
*/
env: {
appTitle: APP_TITLE,
appUrl: process.env.URL // main address of the website. Prodived by Netlify
},
/*
** Customize the progress bar color
*/
loading: { color: "#3B8070" },
/*
** Nuxt.js dev-modules
*/
buildModules: [
"@nuxt/typescript-build",
"@nuxtjs/dotenv",
[
// Doc: https://github.com/nuxt-community/fontawesome-module
"@nuxtjs/fontawesome",
{ icons: { solid: ["faHeart", "faCopy", "faMoon", "faDesktop", "faRainbow"], regular: ["faSun"] } }
],
[
// Doc: https://github.com/nuxt-community/nuxt-tailwindcss
"@nuxtjs/tailwindcss",
{
configPath: "../tailwind.config.js", // relative to the src folder
cssPath: "@/assets/scss/tailwind.scss"
}
],
// Doc: https://github.com/nuxt-community/color-mode-module
["@nuxtjs/color-mode", { preference: "light" }],
"@nuxtjs/pwa"
],
purgeCSS: {
whitelist: ["__nuxt", "__layout", "dark-mode"],
whitelistPatterns: [/page-(enter|leave)/, /svg.*/, /fa.*/] // Keep Fontawesome classes
},
pwa: {
manifest: {
name: "Nuxt.js Template",
short_name: "Nuxt.js Template"
}
},
/*
** Nuxt.js modules
*/
modules: [
[
"nuxt-i18n",
{
locales: [
{ code: "en", iso: "en-US", name: "English" },
{ code: "fr", iso: "fr-FR", name: "Français" }
],
defaultLocale: "en",
baseUrl: process.env.URL,
vueI18n: {
fallbackLocale: "en",
messages: {
en: require("./src/locales/en.json"),
fr: require("./src/locales/fr.json")
}
},
// Activate the language detection only on deployments
// Mostly to avoid headache with the e2e tests
detectBrowserLanguage: !!process.env.NETLIFY
}
]
],
/*
** Change the source directory
*/
srcDir: "src/",
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend(config, { isDev, isClient }) {}
}
};