@@ -21,6 +21,14 @@ import getSiteMeta from "./utils/getSiteMeta";
21
21
const baseUrl = process . env . BASE_URL || "http://localhost:3000" ;
22
22
const baseDir = process . env . BASE_DIR || "/" ;
23
23
const basePath = baseUrl + baseDir ;
24
+ const routerBase =
25
+ process . env . DEPLOY_ENV === "GH_PAGES"
26
+ ? {
27
+ router : {
28
+ base : "/Nuxtation/" ,
29
+ } ,
30
+ }
31
+ : { } ;
24
32
25
33
// meta
26
34
const lang = "en" ;
@@ -69,14 +77,15 @@ export default defineNuxtConfig({
69
77
shortName,
70
78
lang,
71
79
} ,
72
- router : {
73
- base : '/nuxtation/' ,
74
- middleware : "pages" ,
75
- prefetchLinks : false ,
76
- // middleware: ['pages','visits','user-agent'],
77
- linkActiveClass : "is-active" ,
78
- linkExactActiveClass : "is-exact-active" ,
79
- } ,
80
+ ...routerBase ,
81
+ // router: {
82
+ // base: '/nuxtation/',
83
+ // middleware: "pages",
84
+ // prefetchLinks: false,
85
+ // // middleware: ['pages','visits','user-agent'],
86
+ // linkActiveClass: "is-active",
87
+ // linkExactActiveClass: "is-exact-active",
88
+ // },
80
89
publicRuntimeConfig : {
81
90
baseUrl : process . env . BASE_URL || "http://localhost:3000" ,
82
91
googleAnalytics : {
@@ -533,10 +542,7 @@ export default defineNuxtConfig({
533
542
** Nuxt.js dev-modules
534
543
*/
535
544
stylelint : {
536
- files : [
537
- "./src/assets/**/*.{s?(a|c)ss}" ,
538
- "{components,layouts,pages}/**/*.vue" ,
539
- ] ,
545
+ files : [ "./src/assets/**/*.{s?(a|c)ss}" , "{components,layouts,pages}/**/*.vue" ] ,
540
546
fix : true ,
541
547
} ,
542
548
/*
@@ -625,8 +631,7 @@ export default defineNuxtConfig({
625
631
] ,
626
632
optimizedImages : {
627
633
optimizeImages : true ,
628
- imagesName : ( { isDev } ) =>
629
- isDev ? "[path][name][hash:optimized].[ext]" : "img/[name].[ext]" ,
634
+ imagesName : ( { isDev } ) => ( isDev ? "[path][name][hash:optimized].[ext]" : "img/[name].[ext]" ) ,
630
635
} ,
631
636
// fontawesome: {
632
637
// icons: {
@@ -862,9 +867,7 @@ export default defineNuxtConfig({
862
867
}
863
868
}
864
869
// vue-svg-inline-loader
865
- const vueRule = config . module . rules . find ( ( rule ) =>
866
- rule . test . test ( ".vue" )
867
- ) ;
870
+ const vueRule = config . module . rules . find ( ( rule ) => rule . test . test ( ".vue" ) ) ;
868
871
vueRule . use = [
869
872
{
870
873
loader : vueRule . loader ,
0 commit comments