Skip to content

Commit 88a0dd7

Browse files
committed
chore: update readme.md
1 parent 9f03894 commit 88a0dd7

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -845,32 +845,27 @@ You can add custom rules to define how attributes are parsed - we use [posthtml-
845845

846846
### Plugins
847847

848-
You can specify whether plugins are applied before or after the `posthtml-expressions` plugin:
848+
Use the `plugins` option to apply your own PostHTML plugins to the components.
849849

850-
```js
851-
const options = {
852-
plugins: {
853-
before: [/* ... */],
854-
after: [/* ... */],
855-
}
856-
};
857-
```
858-
859-
For backwards compatibility, passing an array will default to applying plugins after the `posthtml-expressions` plugin. The following options are equivalent:
850+
This can be an array of plugins, or an object with `before` and `after` properties to apply plugins before or after the `posthtml-expressions` plugin runs.
860851

861852
```js
853+
// As array
862854
const options = {
863855
plugins: [/* ... */]
864856
};
865857

858+
// As object with `before` and `after`
866859
const options = {
867860
plugins: {
868861
before: [/* ... */],
869-
after: [],
862+
after: [/* ... */],
870863
}
871864
};
872865
```
873866

867+
When using `plugins` as an array, the plugins will be applied after `posthtml-expressions`.
868+
874869
### Advanced attributes configurations
875870

876871
If default configurations for valid attributes are not right for you, you may configure them as explained below.

0 commit comments

Comments
 (0)