Rollup 1.0.0 发布,下一代 ES 模块打包器

栏目: 软件资讯 · 发布时间: 6年前

内容简介:Rollup 1.0.0 发布了,Rollup 号称下一代 ES 模块打包器,它使用标准化的 ES 模块格式,而不是以往的特殊化解决方案,如 CommonJS 和 AMD。 此版本主要更新内容包括: Breaking Changes 移除或重命名了一些选项 ...

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

  • --dir 选项现在有别名 -d (#2293)

  • --input 选项现在支持通过 = 命名入口点 (#2293)

Bug Fixes

  • --input 选项和默认 CLI 选项现在都支持命名输入 (#2293)

详情查看发布公告

下载地址:


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

High Performance Python

High Performance Python

Andrew Lewis / O'Reilly Media, Inc. / 2010-09-15 / USD 34.99

Chapter 1. Introduction Section 1.1. The High Performance Buzz-word Chapter 2. The Theory of Computation Section 2.1. Introduction Section 2.2. Problems Section 2.3. Models of Computati......一起来看看 《High Performance Python》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

在线进制转换器
在线进制转换器

各进制数互转换器

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码