@micro-app/plugin-webpack
[Plugin] webpack adapter plugin.
Last updated 4 months ago by zyao89 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @micro-app/plugin-webpack 
SYNC missed versions from official npm registry.

Micro APP Plugin - Webpack

[Plugin] webpack plugin.

基于webpack多入口的多仓库业务模块开发的插件应用框架核心库.

Github Actions Coveralls Coverage Status NPM Version NPM Download

Install

yarn add @micro-app/plugin-webpack

or

npm install -S @micro-app/plugin-webpack

Usage

在项目 根目录micro-app.config.js 文件中配置

module.exports = {
    // ...

    plugins: [ // 自定义插件
        ['@micro-app/plugin-webpack', {
            // 一些插件配置项
            // ReplaceFileNotExists: {
            //     debug: false, // 开启log
            //     warnHint: 'Not Found',
            //     loader: '', // 路径
            //     resource: '', // 路径
            //     test: /^@micros\//i, // 匹配规则
            // },
            // SpeedMeasurePlugin: {
            //     disabled: true,
            // },
            // HappyPack: {
            //     disabled: true,
            // },
        }],
    ],
};

Build

npx micro-app build

or

npx micro-app-build

内置部分插件提供的 api 方法补充

可通过如下命令进行动态查看

npx micro-app show methods

以提供的方法如下, System Build-in 为内置方法

╰─➤  npx micro-app show methods
  Plugin Methods:
     * modifyWebpackChain          ( 合并之后提供 webpack-chain 进行再次修改事件 )
     * onWebpcakChain              ( 修改之后提供 webpack-chain 进行查看事件 )
     * modifyWebpackConfig         ( 合并之后提供 webpack config 进行再次修改事件 )
     * onBuildSuccess              ( 构建成功时事件 )
     * onBuildFail                 ( 构建失败时事件 )
     * beforeBuild                 ( 开始构建前事件 )
     * afterBuild                  ( 构建结束后事件 )

Current Tags

  • 0.0.15                                ...           latest (4 months ago)
  • 0.0.1-alpha.1                                ...           next (6 months ago)

14 Versions

  • 0.0.15                                ...           4 months ago
  • 0.0.13                                ...           4 months ago
  • 0.0.12                                ...           4 months ago
  • 0.0.11                                ...           5 months ago
  • 0.0.10                                ...           5 months ago
  • 0.0.9                                ...           5 months ago
  • 0.0.8                                ...           5 months ago
  • 0.0.7                                ...           5 months ago
  • 0.0.6                                ...           5 months ago
  • 0.0.5                                ...           5 months ago
  • 0.0.4                                ...           5 months ago
  • 0.0.3                                ...           5 months ago
  • 0.0.2                                ...           5 months ago
  • 0.0.1-alpha.1                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 2
Dev Dependencies (10)

Copyright 2014 - 2016 © taobao.org |