mpw

0.1.0 • Public • Published

基于wbebpack封装的多页打包工具

install

npm i mpw -S

使用

mp-webpack默认回去找项目根目录下的mpw-config.js文件,可以通过--config参数指定配置文件的位置

开发环境

mpw dev --config [?path:string]

生产环境

mpw --config [?path:string]

配置文件

module.exports = {
    htmls: 'src/html',
    entries: 'src/js',
    config: 'webpack.config.js',
    htmlRoot: '',
    main: 'src/main.js',
    open: true,
    flatten: true,
    host: 'localhost',
    port: 3300,
    proxy: {},
    temps: {}
}

  • htmls:需要扫描的的html文件目录
  • entries:每个html的入口js文件目录
  • config:webpack配置文件目录
  • htmlRoot:打包后后html的前缀
  • main:公共js入口,必须的
  • open:是否打开浏览器
  • flatten:html目录层次是否展平

Readme

Keywords

Package Sidebar

Install

npm i mpw

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

17 kB

Total Files

12

Last publish

Collaborators

  • lingcz