Skip to content

xwcoder/ssi-mini-webpack-plugin

Repository files navigation

ssi-mini-webpack-plugin

A webpack plugin to support ssi.

Install

npm install ssi-mini-webpack-plugin --save-dev

Usage

// 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. Default false. 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. Option remote has priority.

About

A webpack plugin to support ssi.

Resources

License

Stars

Watchers

Forks

Packages

No packages published