-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
41 lines (40 loc) · 1.24 KB
/
nuxt.config.ts
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
import axios from 'axios';
// create a function to fetch the routes from the API
// const getPostRoutes = () => {
// // return the array of routes
// let result = [];
// for (let i = 1; i < 827; i++) {
// result.push(`/products/${i}`);
// }
// return result;
// };
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
app: {
baseURL: '/rickandmorty/', // baseURL: '/<repository>/'
buildAssetsDir: 'assets', // don't use "_" at the begining of the folder name to avoids nojkill conflict
},
// generate: {
// nojekyll: true, //not working on this version
// },
ssr: true, //server side rendered enabled //When true
// hooks: {
// async 'nitro:config'(nitroConfig) {
// // fetch the routes from our function above
// const slugs = getPostRoutes();
// // add the routes to the nitro config
// nitroConfig.prerender.routes.push(...slugs);
// },
// },
// target: 'static',
css: ['@/assets/css/style.css'],
devtools: { enabled: true },
modules: ['@pinia/nuxt'],
pinia: {
autoImports: [
// automatically imports `defineStore`
'defineStore', // import { defineStore } from 'pinia'
['defineStore', 'definePiniaStore'], // import { defineStore as definePiniaStore } from 'pinia'
],
},
});