Rollup 1.0.0 发布了,Rollup 号称下一代 ES 模块打包器,它使用标准化的 ES 模块格式,而不是以往的特殊化解决方案,如 CommonJS 和 AMD。
此版本主要更新内容包括:
Breaking Changes
- 移除或重命名了一些选项 (#2293, #2409):
- banner -> output.banner
- dest -> output.file
- entry -> input
- experimentalCodeSplitting -> now always active
- experimentalDynamicImport -> now always active
- experimentalPreserveModules -> preserveModules
- exports -> output.exports
- extend -> output.extend
- footer -> output.footer
- format -> output.format
- freeze -> output.freeze
- globals -> output.globals
- indent -> output.indent
- interop -> output.interop
- intro -> output.intro
- load -> use plugin API
- moduleName -> output.name
- name -> output.name
- noConflict -> output.noConflict
- output.moduleId -> output.amd.id
- outro -> output.outro
- paths -> output.paths
- preferConst -> output.preferConst
- pureExternalModules -> treeshake.pureExternalModules
- resolveExternal -> use plugin API
- resolveId -> use plugin API
- sourcemap -> output.sourcemap
- sourceMap -> output.sourcemap
- sourceMapFile -> output.sourcemapFile
- strict -> output.strict
- targets -> use output as an array
- transform -> use plugin API
- useStrict -> output.strict
- 一般情况下,输出选项不能再用作输入选项 (#2409)
- bundle.generate 和 bundle.write现在返回新格式 (#2293)
- 弃用几个插件 hook (#2409):
- transformBundle
- transformChunk
- ongenerate
- onwrite
- 除非使用 inlineDynamicImports,否则使用动态导入语句将默认创建新块 (#2293)
- 使用 acorn@6 (#2293)
Features
Bug Fixes
- –input 选项和默认 CLI 选项现在都支持命名输入 (#2293)
详情查看发布公告。
下载地址:
转自 https://www.oschina.net/news/103161/rollup-1-0-0-released