0.10.8 • Published 4 years ago

@reskript/cli-rollup v0.10.8

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

@reskript/cli-rollup

通过rollup打包基础库。

正常使用

使用skr rollup来对基础库(非业务系统)进行打包,底层使用rollup实现。

Usage: rollup [options]

Build entire app

Options:
  --cwd [value]   override current working directory (default: process.cwd())
  --mode [value]  set build mode, default to "production" (default: "production")
  --clean         remove dist directory before build
  -h, --help      output usage information

配置构建

可以在settings.js中导出rollup对象,允许有以下属性:

  • {string} styleOutput:指定样式的输出格式,为"inject"时内置到JavaScript中,为"extract"时输出为与JavaScript同名的.css文件,为"index"时输出为单个style/index.css文件,默认值为"index"
  • {string} target:指定编译的目标平台,为"web""node""universal",默认为"universal"。指定"web"时仅用于浏览器,但可以基于此做一些优化,如移除node模块的依赖。

除此以外,当前版本不暴露任何配置,封闭了eslintbabelpostcss等能力。