Skip to content

fix(module): Nuxt 2 support - #508

Merged
atinux merged 3 commits into
nuxt-modules:mainfrom
Tahul:fix/nuxt2
Jul 25, 2022
Merged

fix(module): Nuxt 2 support#508
atinux merged 3 commits into
nuxt-modules:mainfrom
Tahul:fix/nuxt2

Conversation

@Tahul

@TahulTahul commented Jul 15, 2022

Copy link
Copy Markdown
Contributor

Since 5.2.0, some Nuxt 2 users encountered issues with the module.

@bmulholland kindly found it was related to @nuxt/kit inconsistencies between Nuxt 2 and 3.

That PR solves the support for tailwind.config in Nuxt 2, and disables the config viewer in that environment.

Config viewer seem to break the stack as @nuxt/kit addServerHandler seem to break the module in that environment.

That issue is tracked here, thanks to @harlan-zw: #507

Resolves: #500

@bmulholland

Copy link
Copy Markdown

Thanks for the fix <3

@Tahul

Copy link
Copy Markdown
ContributorAuthor

Hey @bmulholland ;

If you want to use the fix in your app, I made an edge publish for it:
@nuxtjs/tailwindcss-edge@5.3.0-a9077c2

Thanks for your collaboration and sorry for not checking Nuxt 2 support earlier, it was unexpected!

@bmulholland

Copy link
Copy Markdown

Hah! I bet it was unexpected :). A bug in a core nuxt library caused by an ambiguous, undocumented configuration parameter that changed between versions also by the core library is one hell of a gotcha.

@harlan-zw

Copy link
Copy Markdown
Contributor

Looks good 👍 The Nuxt 2 playground will be useful to avoid regressions in the future

@dneckel

Copy link
Copy Markdown

Would love to see this merged soon ❤️

@pencilcheck

pencilcheck commented Oct 7, 2022

Copy link
Copy Markdown

Not sure if this is related, but I am also getting this error when I tried to add it as a module inside my builder class but for my case it seems like downgrading didn't fix this issue

#505

nuxt/nuxt#10247

Further investigation shows that nuxt-highlightjs somehow add the css array an object instead of a string, and that cause the resolvePath function to fail, not sure if this is a error from the tailwindcss side, or is it an error in nuxt-highlightjs side.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Major 5.2.0 regression: no longer loads tailwind config by default

6 participants

@Tahul@bmulholland@harlan-zw@dneckel@pencilcheck@atinux