Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

weapp-plugin-require-enhance

ranshaw6MIT0.1.1

fix weapp-plugin-require bugs

weapp, weapp-plugin, alias, weapp-start, weapp-plugin-require

readme

weapp-plugin-require-enhance

分析 js 文件的 npm 依赖,进行拷贝,修复 weapp-plugin-require 的 bug,并新增了 alias 功能

安装

npm i  weapp-plugin-require-enhance -D

使用

weapp.config.js

module.exports = {
  plugins: [
    ['weapp-plugin-require-enhance', {
        ignore: undefined,
        match: /\.js$/,
        alias: {
          utils: path.resolve(__dirname, 'src/utils/'),
        },
        ...config
    }],
    // 'weapp-plugin-require-enhance',
  ],
};

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.1.1 (2019-07-31)

Note: Version bump only for package weapp-plugin-require-enhance

0.1.0 (2019-07-31)

Features

  • 将修改过的包发布到应用市场 (dd92ab2)

0.3.6 (2018-05-27)

Bug Fixes

  • weapp-start: 同名的文件夹和文件,文件的查找优先级更高 (57c1af5)

0.3.5 (2018-05-23)

Bug Fixes

  • 修复构建依赖版本 node8->es5 (6e94983)

0.3.4 (2018-05-20)

Bug Fixes

  • lodash _freeglobal hack (edce5cf)

0.3.3 (2018-05-19)

Bug Fixes

0.3.2 (2018-05-19)

Performance Improvements

0.3.1 (2018-05-18)

Performance Improvements

  • string stream to buffer stream (e9aec75)
  • use create-plugin refactor (444c2e3)

0.3.0 (2018-05-17)

Bug Fixes

  • babel-runtime _root replace hack (65ddfc9)

Features

  • add match, ignore option (8b3ed44)

0.2.2 (2018-05-11)

Bug Fixes

  • 兼容 weapp-start 1.0.0 (c7424e6)

0.2.1 (2018-05-08)

Bug Fixes

  • 修复babel-runtime环境监测错误 (bc0fe6e)
  • 修复某些第三方包在npm下文件名都为index.js (3cbfc95)

0.2.0 (2018-05-07)

Bug Fixes

  • 修复 require 替换模块字符串错误 (f6516d4)
  • 修复 require 相对路径模块,对文件夹的解析错误 (e85268c)
  • 修复包 babel-runtime 的环境依赖报错问题 (336a483)
  • 修复对没有 main 字段和 index 文件的 npm 包的解析错误(babel-runtime) (9aea19d)
  • 修复重复拷贝npm依赖 (c0af59d)

Features

  • 支持小程序内使用隐式相对路径,不建议使用 (42f6ee0)

0.1.4 (2018-05-04)

  • fix: 纠正生产依赖 babel-runtime 的位置 (c5b2cd4)