You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe your issue
The problem is that i am using ecmascript modules(i dont wanna change on commonjs) in my tailwindcss.config and postcss.config. It works with Vite but tailwind css intellisense throw error Unexpected token 'export'(how it was for me with webpack where esm tailwindcss dont even works with webpack). Question: how to fix tailwind css intellisense for working with es modules?
Tailwind CSS IntelliSense output:
[Error - 4:59:59 PM] Tailwind CSS: Unexpected token 'export'
c:\Projects\project\project\client\tailwind.config.js:12
export default tailwindConfig;
^^^^^^
SyntaxError: Unexpected token 'export'
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1086:15)
at Module._compile (node:internal/modules/cjs/loader:1121:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1220:10)
at Module.load (node:internal/modules/cjs/loader:1035:32)
at Module._load (node:internal/modules/cjs/loader:876:12)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.require (node:internal/modules/cjs/loader:1059:19)
at LI._require.Js.default.require (c:\Users\yoffens\.vscode\extensions\bradlc.vscode-tailwindcss-0.9.8\dist\tailwindServer.js:178:45213)
at require (node:internal/modules/cjs/helpers:102:18)
The text was updated successfully, but these errors were encountered:
Hey! Up until today Tailwind itself didn't support ESM config files, which is why it's not supported in IntelliSense yet. Good news is this will be supported in IntelliSense very soon when we release Tailwind CSS v3.3 in a couple of weeks 👍
Going to close this as we try to reserve issues for bug reports and this is more of a feature request, but look for an update with ESM support soon.
What version of Tailwind CSS IntelliSense are you using?
v0.9.8
What version of Tailwind CSS are you using?
"tailwindcss": "^3.2.7"
What package manager are you using?
npm
What operating system are you using?
Windows
Tailwind config
Reproduction URL
https://github.com/mofflindon/esm-tailwindcss-issue
VS Code settings
Describe your issue
The problem is that i am using ecmascript modules(i dont wanna change on commonjs) in my tailwindcss.config and postcss.config. It works with Vite but tailwind css intellisense throw error Unexpected token 'export'(how it was for me with webpack where esm tailwindcss dont even works with webpack). Question: how to fix tailwind css intellisense for working with es modules?
Tailwind CSS IntelliSense output:
The text was updated successfully, but these errors were encountered: