Skip to content

Release prettier dependency update #269

Open
@oliviertassinari

Description

@oliviertassinari
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions