Skip to content

Commit 56606fe

Browse files
committed
🔧 - Fixed Error on PurgeCSS Config
1 parent a99dcba commit 56606fe

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

‎nuxt.config.ts‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,37 @@ const nuxtConfig: Configuration = {
8080
/*
8181
** You can extend webpack config here
8282
*/
83+
optimizeCSS: true,
84+
optimization: {
85+
splitChunks: {
86+
chunks: 'all',
87+
minSize: 10000,
88+
maxSize: 200000
89+
}
90+
},
91+
transpile: ['vuetify/lib']
92+
},
93+
purgeCSS: {
94+
mode: 'webpack',
95+
enabled: ({ isDev, isClient }: any) => !isDev && isClient, // or `false` when in dev/debug mode
96+
paths: [
97+
'components/**/*.vue',
98+
'layouts/**/*.vue',
99+
'pages/**/*.vue',
100+
'plugins/**/*.js'
101+
],
102+
styleExtensions: ['.css'],
103+
whitelist: ['body', 'html', 'nuxt-progress'],
104+
extractors: [
105+
{
106+
extractor: class {
107+
static extract(content: any) {
108+
return content.match(/[A-z0-9-:\\/]+/g)
109+
}
110+
},
111+
extensions: ['html', 'vue', 'js, ts']
112+
}
113+
]
83114
}
84115
}
85116

0 commit comments

Comments
 (0)