remcohaszing / monaco-tailwindcss

Tailwindcss intellisense support in Monaco editor
https://monaco-tailwindcss.js.org
MIT License
87 stars 14 forks source link

[Q&A] Can this package be used within a Next.js project? #74

Closed lautarodapin closed 1 year ago

lautarodapin commented 1 year ago

Can someone give me an example? I could not figure it out how to make it work.

remcohaszing commented 1 year ago

Yes. In fact, I'm using it with Next.js 🙂

Have you gotten Monaco editor to work without warnings? If so, how? Import monaco-editor? CDN? Webpack plugin?

remcohaszing commented 1 year ago

I'm closing this issue, because it's a question, not an issue with this project.

dinhanhthi commented 8 months ago

@remcohaszing : Can you give us an example of integrating this within nextjs, please?

remcohaszing commented 8 months ago

When I wrote this, it was for a client integrating this in a Next.js application, so it is possible. It has been a while though, so I can’t really help. I suggest you start by making sure you use monaco-editor in your project, not Monaco from a CDN. This involves configuring Webpack in your Next.js project, and making sure Monaco is only used in client components. If you get this to work, integrating monaco-tailwindcss should be easy. Also please report your findings to https://github.com/vercel/next.js/pull/49762 if you get it to work.

remcohaszing commented 5 months ago

See https://github.com/remcohaszing/monaco-yaml/issues/219#issuecomment-2198118949