This package has been deprecated

Author message:

use babel-plugin-pure-calls-annotation instead

babel-plugin-annotate-pure-call-in-variable-declarator
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

babel-plugin-annotate-pure-call-in-variable-declarator

Build Status NPM Dependencies License

Automated annotate #PURE to call expression which in variable declarator, assignment expression and arguments of call expression

Purpose

help to annotate #PURE to drop dead code in Webpack for uglyfiy and tree shaking

Will transform

export const call = (s) => {
  return "call" + s
}
 
export const stringA = call("a")
export const stringB = (() => call("b"))()

to

export const call = (s) => {
  return "call" + s
}
 
export const stringA = /*#__PURE__*/call("a")
export const stringB = /*#__PURE__*/(() => call("b"))()

Readme

Keywords

none

Package Sidebar

Install

npm i babel-plugin-annotate-pure-call-in-variable-declarator

Weekly Downloads

8

Version

0.2.1

License

WTFPL

Last publish

Collaborators

  • morlay_null