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
If you want to use are shareable config file instead of inline options in your `webpack.config.js` create a `posthtml.config.js` file and place it somewhere down the file tree in your project. The nearest config relative to `dirname(file)` currently processed by the loader applies. This enables **Config Cascading**. Despite some edge cases the config file will be loaded automatically and **no** additional setup is required. If you don't intend to use Config Cascading, it's recommended to place `posthtml.config.js` in the **root**`./` of your project
71
75
72
76
```
@@ -158,6 +162,22 @@ If you want to use a custom parser e.g [SugarML](https://github.com/posthtml/sug
158
162
}
159
163
```
160
164
165
+
### `skipParse`
166
+
167
+
If you want to use disable parsing, you can pass it in under the `skipParse` key in the loader options
168
+
169
+
#### `{Boolean}`
170
+
171
+
**webpack.config.js**
172
+
```js
173
+
{
174
+
loader:'posthtml-loader',
175
+
options: {
176
+
skipParse:false
177
+
}
178
+
}
179
+
```
180
+
161
181
### `Render`
162
182
163
183
If you want to use a custom render, you can pass it in under the `render` key in the loader options
@@ -220,6 +240,38 @@ Plugins are specified under the `plugins` key in the loader options
220
240
}
221
241
```
222
242
243
+
### `Sync`
244
+
245
+
Enables sync mode, plugins will run synchronously, throws an error when used with async plugins
246
+
247
+
#### `{Boolean}`
248
+
249
+
**webpack.config.js**
250
+
```js
251
+
{
252
+
loader:'posthtml-loader',
253
+
options: {
254
+
sync:true
255
+
}
256
+
}
257
+
```
258
+
259
+
### `Directives`
260
+
261
+
If you want to use a custom directives, you can pass it in under the `directives` key in the loader options
0 commit comments