Skip to content
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

Support in ESM Environments with "tailwind.config.cjs" #198

Closed
lannonbr opened this issue Oct 3, 2020 · 2 comments
Closed

Support in ESM Environments with "tailwind.config.cjs" #198

lannonbr opened this issue Oct 3, 2020 · 2 comments

Comments

@lannonbr
Copy link

lannonbr commented Oct 3, 2020

As discussed in tailwindlabs/tailwindcss#2284, it is possible to still use Tailwind in a ESM environment by declaring the config file to have a .cjs file extension. That said, it breaks the activation event & sourcing of the config as it is looking for various options ending with .js.

I'm curious if it would be possible to add functionality for this extension to pick up tailwind config files that end with .cjs

@bradlc
Copy link
Contributor

bradlc commented Dec 10, 2020

The extension will now look for config files with a .cjs extension as well as .js, as of v0.5.5 👍

@DoisKoh
Copy link

DoisKoh commented Mar 27, 2022

Does the extension only work with CJS? Changing tailwind.config.js to ESM results in an error - the tailwindServer.js file tries to require instead of import.

kulla added a commit to serlo/serlo-editor-for-edusharing that referenced this issue Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants