rollup-plugin-es3

Make rollup compatible with ES3, remove Object.defineProperty of __esModule part

MIT 5 个版本
安装
npm install rollup-plugin-es3
yarn add rollup-plugin-es3
pnpm add rollup-plugin-es3
bun add rollup-plugin-es3
README

rollup-plugin-es3

Build Status

Rollup plugin, to make it more compatible with ES3.

Currently it's only do 2 things:

  • Remove Object.defineProperty of __esModule part (rollup issue #750)
  • Remove Object.freeze (issue #1)

Install

npm i rollup-plugin-es3 -D

Usage

import { rollup } from 'rollup'
import es3 from 'rollup-plugin-es3'

rollup({
	entry: 'main.js',
	plugins: [
		es3()
	]
})

Option

// pass the list of removal
	plugins: [
		es3({ remove: ['defineProperty', 'freeze'] })
	]
版本列表
1.1.0 2017-12-09
1.0.3 2016-08-26
1.0.2 2016-08-19
1.0.1 2016-08-18
1.0.0 2016-08-18