-
Notifications
You must be signed in to change notification settings - Fork 212
require() of ES Module is not supported #592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This postcss config works btw: import tailwind from "tailwindcss"
import autoprefixer from "autoprefixer"
import tailwindConfig from "./tailwind.config.js"
export default {
plugins: [tailwind(tailwindConfig), autoprefixer],
} |
This is happening because Tailwind CSS does not yet support ESM config files. We'll need to update Tailwind CSS itself, Intellisense, our prettier plugin, and other bits to support ESM. It's something we want to do but need to devote a proper amount of time to doing it for everything at one time. I gave a short explanation about this here: tailwindlabs/tailwindcss#3544 (comment) |
… intellisense doesn't support ESM config files Relevant issue: tailwindlabs/tailwindcss-intellisense#592
What version of Tailwind CSS IntelliSense are you using?
For example: v0.8.6
What version of Tailwind CSS are you using?
For example: v3.1.8
What package manager are you using?
pnpm
What operating system are you using?
macos
Reproduction URL
Set "type: module" in package.json and use
export default {}
Describe your issue
I have switched to "type: module" in my Vite project due to latest Vite changes and ECMA consistency. Unfortunately the VS Code extension throws an error but compilation works fine. It seems some sort of import error happens.
The text was updated successfully, but these errors were encountered: