Closed JohnCampionJr closed 1 year ago
Ooh that looks quite fragile as you're mixing CJS with EMS and kit utilities in non-module context. This can be re-designed as a module.. (can look into it in a few hours)
Thank you; I've been trying to resolve this by converting to TS but even this still breaks
import type { Config } from 'tailwindcss'
import { createResolver } from '@nuxt/kit'
import icons from '@jcamp/tailwindcss-plugin-icons'
const { resolve } = createResolver(import.meta.url)
export default {
plugins: [
icons.createPluginIcons({
scale: 1.1,
jsonCollections: {
'fa-duotone': resolve('./assets/fa-duotone.json'),
},
}),
]
} satisfies Config
In case anyone else has a similar issue, I moved my tailwind config into the nuxt.config.ts to use the resolver.
Still not sure why it broke between these releases.
Version
@nuxtjs/tailwindcss: 6.8.0 nuxt: 3.5.1
Reproduction Link
Steps to reproduce
I am using a resolver in tailwind.config.js to find a json file:
This works fine up v6.8.0. In 6.8.0 I get the following error:
What is Expected?
Same behavior as earlier versions
What is actually happening?
Error above