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

Release prettier dependency update #269

Open
oliviertassinari opened this issue Dec 24, 2024 · 0 comments
Open

Release prettier dependency update #269

oliviertassinari opened this issue Dec 24, 2024 · 0 comments

Comments

@oliviertassinari
Copy link

oliviertassinari commented Dec 24, 2024

  • babel-plugin-tester version: 11.0.4

Relevant code or config, What you did:

module.exports = {
  printWidth: 100,
  singleQuote: true,
  trailingComma: 'all',
  plugins: ['prettier-plugin-tailwindcss'],
}

What happened:

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/oliviertassinari/material-ui/node_modules/.pnpm/[email protected][email protected]/node_modules/prettier-plugin-tailwindcss/dist/index.mjs not supported.
Instead change the require of /Users/oliviertassinari/material-ui/node_modules/.pnpm/[email protected][email protected]/node_modules/prettier-plugin-tailwindcss/dist/index.mjs to a dynamic import() which is available in all CommonJS modules.

Problem description: prettier-plugin-tailwindcss is an ESM only package, proof: https://unpkg.com/prettier-plugin-tailwindcss/package.json, but babel-plugin-tester@latest depends on:

"prettier": "^2.8.3",

The problem is that support for ESM plugin comes only later on https://prettier.io/blog/2023/07/05/3.0.0.html#support-plugins-in-esm-13201httpsgithubcomprettierprettierpull13201-by-fiskerhttpsgithubcomfisker.

Suggested solution: Can we publish a new version?

https://github.com/babel-utils/babel-plugin-tester/releases/tag/v12.0.0-canary.1 solved the problem, but it's unstable.

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

1 participant