You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-12Lines changed: 7 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -845,32 +845,27 @@ You can add custom rules to define how attributes are parsed - we use [posthtml-
845
845
846
846
### Plugins
847
847
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.
849
849
850
-
```js
851
-
constoptions= {
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.
860
851
861
852
```js
853
+
// As array
862
854
constoptions= {
863
855
plugins: [/* ... */]
864
856
};
865
857
858
+
// As object with `before` and `after`
866
859
constoptions= {
867
860
plugins: {
868
861
before: [/* ... */],
869
-
after: [],
862
+
after: [/* ... */],
870
863
}
871
864
};
872
865
```
873
866
867
+
When using `plugins` as an array, the plugins will be applied after `posthtml-expressions`.
868
+
874
869
### Advanced attributes configurations
875
870
876
871
If default configurations for valid attributes are not right for you, you may configure them as explained below.
0 commit comments