1.0.1 • Published 4 years ago
ssi-mini-webpack-plugin v1.0.1
ssi-mini-webpack-plugin
A webpack plugin to support ssi.
Install
npm install ssi-mini-webpack-plugin --save-devUsage
// webpack.config.js
const SSIMiniWebpackplugin = require('ssi-mini-webpack-plugin');
module.exports = {
plugins: [
new SSIMiniWebpackplugin({
test: /\.shtml/,
remote: 'https://wqs.jd.com',
minify: true,
}),
],
}Options
- test:
RegExp|Function. To detect which file to - minify:
boolean. Defaultfalse. Minify or not. - remote:
string. The remote url to fetch include content. e.g.,https://example.com/. - local:
string. Default/. The local absolute dir to store html segements. Optionremotehas priority.