-
Notifications
You must be signed in to change notification settings - Fork 45
/
nuxt.config.js
61 lines (60 loc) · 1.59 KB
/
nuxt.config.js
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
import { defineNuxtConfig } from "nuxt/config";
export default defineNuxtConfig({
ssr: true,
components: true,
css: ["~/assets/css/main.css", "~/assets/css/animate.min.css"],
modules: [
"@pinia/nuxt",
"@pinia-plugin-persistedstate/nuxt",
"@nuxtjs/apollo",
"@formkit/nuxt",
"@nuxtjs/algolia",
"nuxt-icon",
"@nuxt/image",
],
plugins: ["~/plugins/apollo", "~/plugins/cartUpdater"],
runtimeConfig: {
public: {
graphqlURL: process.env.PUBLIC_GRAPHQL_URL,
indexName: process.env.PUBLIC_ALGOLIA_INDEX_NAME,
placeholderImage: process.env.PUBLIC_PLACEHOLDER_SMALL_IMAGE_URL,
currencyLocale: process.env.PUBLIC_CURRENCY_LOCALE,
currency: process.env.PUBLIC_CURRENCY,
},
},
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
app: {
head: {
charset: "utf-8",
viewport: "width=500, initial-scale=1",
meta: [{ name: "description", content: "Nuxt 3 - Woocommerce" }],
},
// global transition
pageTransition: { name: "page", mode: "out-in" },
layoutTransition: { name: "layout", mode: "out-in" },
},
algolia: {
apiKey: process.env.ALGOLIA_SEARCH_API_KEY,
applicationId: process.env.ALGOLIA_APPLICATION_ID,
instantSearch: { theme: "algolia" },
},
apollo: {
authType: "Session",
authHeader: "woocommerce-session",
tokenStorage: "cookie",
tokenName: "woocommerce-session",
clients: {
default: {
httpEndpoint: process.env.PUBLIC_GRAPHQL_URL,
httpLinkOptions: {
credentials: "include",
},
},
},
},
});