We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc9776b commit 0c5e073Copy full SHA for 0c5e073
src/module.ts
@@ -10,6 +10,7 @@ import {
10
addTemplate,
11
addDevServerHandler,
12
isNuxt2,
13
+ getNuxtVersion,
14
createResolver,
15
resolvePath,
16
addVitePlugin,
@@ -269,7 +270,11 @@ export default defineNuxtModule<ModuleOptions>({
269
270
postcssOptions.plugins['postcss-custom-properties'] = postcssOptions.plugins['postcss-custom-properties'] ?? {}
271
postcssOptions.plugins.tailwindcss = tailwindConfig
272
- if (isNuxt2()) {
273
+ /*
274
+ * install postcss8 module on nuxt < 2.16
275
+ */
276
+ const nuxtVersion = getNuxtVersion(nuxt).split('.');
277
+ if (parseInt(nuxtVersion[0], 10) === 2 && parseInt(nuxtVersion[1], 10) < 16) {
278
await installModule('@nuxt/postcss8')
279
}
280
0 commit comments