Skip to content

Commit

Permalink
note issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Jul 19, 2023
1 parent b60eca1 commit cd7d310
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Then create a `.prettierrc` file to tell Prettier about the plugin:
}
```

If you're using `pnpm` and have problems getting it to work, you may need to use a `.prettierrc.cjs` file instead to point Prettier to the exact location of the plugin using `require.resolve`:
If you're using `prettier-plugin-svelte` version 2 with `pnpm` and have problems getting it to work, you may need to use a `.prettierrc.cjs` file instead to point Prettier to the exact location of the plugin using `require.resolve`:

```js
module.exports = {
Expand All @@ -52,6 +52,8 @@ module.exports = {
};
```

> Do NOT use the above with version 3 of the plugin
If you want to customize some formatting behavior, see section "Options" below.

## How to use (CLI)
Expand All @@ -70,7 +72,7 @@ As part of your scripts in `package.json`:
"format": "prettier --write --plugin prettier-plugin-svelte ."
```

You can omit the `--plugin prettier-plugin-svelte` part if you created a `.prettierrc` configuration file and told Prettier about the plugin in there.
> There's currently [an issue with Prettier 3](https://github.com/prettier/prettier/issues/15079) which requires the seemingly redundant `--plugin` setting
If you want to customize some formatting behavior, see section "Options" below.

Expand Down

0 comments on commit cd7d310

Please sign in to comment.