wx-webpack-module-plugin

1.0.3 • Public • Published

wx-webpack-module-plugin

996.icu

介绍

一款webpack插件,用来提取小程序公共模块,适用于搭配webpack开发的小程序

使用

在webpack配置文件中:

plugins: [
    new WxWebpackModulePlugin({
        libPaths: ['src/utils', 'src/lib']
    }),
]

参数

libPaths

Type: Array<string>
Default: null

源代码中公共模块的路径(node_modules除外),该路径下的模块将不会被重复打包至各个chunk中,最终会作为小程序主包的一部分。

nodeModulesOutputDir

Type: string
Default: mp_node_modules/

node_modules下的模块被打包至该文件夹下,这个参数可修改该文件夹名称

Package Sidebar

Install

npm i wx-webpack-module-plugin

Weekly Downloads

3

Version

1.0.3

License

MIT

Unpacked Size

57.2 kB

Total Files

10

Last publish

Collaborators

  • sunmg