scw

ssi-compile-webpack-plugin

compile ssi

Showing:

Popularity

Downloads/wk

2

GitHub Stars

4

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

2

Size (min+gzip)

282.3KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

静态编译ssi资源

使用

// webpack.config.js
const SSICompileWebpackplugin = require('ssi-compile-webpack-plugin')
module.exports = {
    // config
    plugin: [
        new SSICompileWebpackplugin({
            publicPath: '',
            localBaseDir: '/',
            minify: false
        })
    ]
}

配合其他插件

插件的资源是根据webpack已有资源表中查找.html后缀产生的。所以正常需要配合其他插件/loader去读取.html作为入口

const HtmlWebpackPlugin = require('html-webpack-plugin')
const SSICompileWebpackplugin = require('ssi-compile-webpack-plugin')
module.exports = {
    // config
    plugin: [
        new HtmlWebpackPlugin({
            // setting
        }),
        new SSICompileWebpackplugin({
            publicPath: '',
            localBaseDir: '/',
            minify: false
        })
    ]
}

配置说明

keyvalue说明
publicPathString资源基础路径,为空时不处理路径,不为空的时将路径拼接为${publicPath}/${path.basename}, 默认 ''
localBaseDirStringsi本地路径的基础路径, 默认 '/'
minifyBoolean是否压缩html, 默认 false
extString需要处理的文件后缀,多后缀名使用`

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100