omi-prerender-plugin
v0.0.3
Published
A plugin to prerender for [Omi](https://github.com/Tencent/omi) framework.
Downloads
6
Readme
omi-prerender-plugin
You can prerender using omi-prerender-plugin
in webpack configuration with html-webpack-plugin
.
Usage
const OmiPrerenderPlugin = require('omi-prerender-plugin');
plugins: [
new HtmlWebpackPlugin({
inject: true,
chunks:['index'],
template: 'index.html'
filename: 'index.html',
minify: {
removeComments: true,
collapseWhitespace: true,
removeRedundantAttributes: true,
useShortDoctype: true,
removeEmptyAttributes: true,
removeStyleLinkTypeAttributes: true,
keepClosingSlash: true,
minifyJS: true,
minifyCSS: true,
minifyURLs: true,
},
}))
new OmiPrerenderPlugin()
]