Skip to content

Commit

Permalink
chore: Update the README docs to suggest svgo.config.mjs (#1958)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyryan1 committed Feb 11, 2024
1 parent e257598 commit 573a5c7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ svgo --help

SVGO has a plugin architecture. You can read more about all plugins in [Plugins | SVGO Documentation](https://svgo.dev/docs/plugins/), and the default plugins in [Preset Default | SVGO Documentation](https://svgo.dev/docs/preset-default/).

SVGO reads the configuration from `svgo.config.js` or the `--config path/to/config.js` command-line option. Some other parameters can be configured though command-line options too.
SVGO reads the configuration from `svgo.config.mjs` or the `--config path/to/config.mjs` command-line option. Some other parameters can be configured though command-line options too.

**`svgo.config.js`**
**`svgo.config.mjs`**

```js
export default {
Expand Down Expand Up @@ -80,7 +80,7 @@ export default {

Instead of configuring SVGO from scratch, you can tweak the default preset to suit your needs by configuring or disabling the respective plugin.

**`svgo.config.js`**
**`svgo.config.mjs`**

```js
export default {
Expand Down Expand Up @@ -109,7 +109,7 @@ You can find a list of the default plugins in the order they run in [Preset Defa

You can also specify custom plugins:

**`svgo.config.js`**
**`svgo.config.mjs`**

```js
import importedPlugin from './imported-plugin';
Expand Down Expand Up @@ -152,7 +152,7 @@ const optimizedSvgString = result.data;

### loadConfig

If you write a tool on top of SVGO you may want to resolve the `svgo.config.js` file.
If you write a tool on top of SVGO you may want to resolve the `svgo.config.mjs` file.

```js
import { loadConfig } from 'svgo';
Expand Down

0 comments on commit 573a5c7

Please sign in to comment.