File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,28 @@ module.exports = {
185
185
};
186
186
```
187
187
188
+ ### Export into HTML files
189
+
190
+ A very common scenario is exporting the HTML into their own _ .html_ file, to
191
+ serve them directly instead of injecting with javascript. This can be achieved
192
+ with a combination of 3 loaders:
193
+
194
+ - [ file-loader] ( https://github.com/webpack/file-loader )
195
+ - [ extract-loader] ( https://github.com/peerigon/extract-loader )
196
+ - html-loader
197
+
198
+ The html-loader will parse the URLs, require the images and everything you
199
+ expect. The extract loader will parse the javascript back into a proper html
200
+ file, ensuring images are required and point to proper path, and the file loader
201
+ will write the _ .html_ file for you. Example:
202
+
203
+ ``` js
204
+ {
205
+ test: / \. html$ / ,
206
+ loader: ' file-loader?name=[path][name].[ext]!extract-loader!html-loader'
207
+ }
208
+ ```
209
+
188
210
<h2 align =" center " >Maintainers</h2 >
189
211
190
212
<table >
You can’t perform that action at this time.
0 commit comments