fis3-hook-sys_node_modules
fis3 npm support
Last updated 4 years ago by feix760 .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install fis3-hook-sys_node_modules 
SYNC missed versions from official npm registry.

fis3-hook-sys_node_modules

fis3 对npm的node_modules模块的支持(使用node运行环境的node_modules)

Install

npm install fis3-hook-sys_node_modules -g

Dependencies

  • fis3-hook-commonjs
  • mod.js

Usage

添加commonjs支持 (需要先安装fis3-hook-commonjs)

fis.hook('commonjs', {
    extList: ['.js', '.jsx', '.es', '.ts', '.tsx']
})

禁用fis3默认的fis-hook-components

fis.unhook('components')

使用node_modules

fis.hook('sys_node_modules', {
    tryMin: fis.project.currentMedia() === 'dist' // 可选, 发布的时候直接使用min文件
})

为node_modules文件添加针对mod.js的转换

fis.match('/node_modules/**.js', {
    isMod: true
});

取消node_modules下min文件的babel/uglify

fis.match('/node_modules/**.min.js', {
    optimizer: null, 
    parser: null
})

配置项说明

  • dev {String} process.env.NODE_ENV值
  • browser {Object} 相当于覆盖package.json中的browser
    • 例如直接使用react.min.js {react: 'dist/react.min.js'}
  • tryMin 默认为false 是否尝试使用dist/XX.min.js, 加快编译速度(建议发布模式时使用)

Current Tags

  • 0.0.13                                ...           latest (4 years ago)

13 Versions

  • 0.0.13                                ...           4 years ago
  • 0.0.12                                ...           4 years ago
  • 0.0.11                                ...           4 years ago
  • 0.0.10                                ...           4 years ago
  • 0.0.9                                ...           4 years ago
  • 0.0.8                                ...           4 years ago
  • 0.0.7                                ...           4 years ago
  • 0.0.6                                ...           4 years ago
  • 0.0.5                                ...           4 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |