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
+37Lines changed: 37 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -117,10 +117,33 @@ Provides the full list of PostCSS plugins to the pipeline. Providing this cancel
117
117
118
118
In rare cases you may want to precompile styles, before they will be passed to the PostCSS pipeline. You should use **synchronous** transformations, since `require` function is synchronous.
119
119
120
+
```javascript
121
+
hook({
122
+
/**
123
+
* @param{string}css
124
+
* @param{string}filepath Absolute path to the file
125
+
* @return{string}
126
+
*/
127
+
preprocessCss:function (css, filepath) {
128
+
return css;
129
+
}
130
+
});
131
+
```
132
+
120
133
### `processCss` function
121
134
122
135
In rare cases you may want to get compiled styles in runtime, so providing this option helps.
123
136
137
+
```javascript
138
+
hook({
139
+
/**
140
+
* @param{string}css
141
+
* @param{string}filepath Absolute path to the file
142
+
*/
143
+
processCss:function (css, filepath) { /**/ }
144
+
});
145
+
```
146
+
124
147
### `extensions` array
125
148
126
149
Attach the require hook to additional file extensions (for example `['.scss']`).
@@ -141,6 +164,20 @@ Short alias for the [postcss-modules-extract-imports](https://github.com/css-mod
141
164
142
165
Short alias for the [postcss-modules-scope](https://github.com/css-modules/postcss-modules-scope) plugin's option. Helps you to specify the custom way to build generic names for the class selectors.
0 commit comments