4.78.0 • Published 3 years ago

babel-preset-yoshi v4.78.0

Weekly downloads
879
License
ISC
Repository
-
Last release
3 years ago

babel-preset-yoshi

Yoshi provides its own preset for full-stack, client or Node.js projects. It is pre-configured, maintained and tuned for the current state of Yoshi.

Usages in Yoshi projects

Configure yoshi to use its built-in preset by adding the following to your package.json:

{
  "babel": {
    "presets": ["yoshi"]
  }
}

Configuration options

  • targets: Avoid redundant transformations if specified targets already support some of ESNext features. Read more. By default, if no targets provided, it will compile for all targets (node on test environment).
  • modules (default: "commonjs"): Enable transformation of ES6 module syntax to another module type. Read more. Set false to ignore module transforms.
  • ignoreReact (default: false): Ignores plugins and presets related to React.
  • debug (default: false): Outputs the targets/plugins used according to specified targets. Read more.

Modes

The preset behaves differently according to the environment. The environment is determined by checking process.env.BABEL_ENV, process.env.NODE_ENV and use development as the default if none was supplied.

  1. NODE_ENV = 'test' - Transpile for current node version for fast testing in mind.

  2. NODE_ENV = 'development' - Transpile for modern browsers for fast builds in mind.

  3. NODE_ENV = 'production' - Optimize bundle, compile for all possible targets from IE10, prepare for uglifycation, with full browsers support, runtime optimization and small bundle size in mind.

Wanna know what's inside?

  • preset-env for ESNext to ES5 transform. Moreover, you can customize current targets and module type to build for. Will use all targets and commonjs module type as a default values. Configured with target node for test environment.
  • preset-react for JSX and Flow transforms.
  • transform-runtime externalize references to helpers and builtins, automatically polyfilling your code without polluting globals.
  • transform-class-properties.
  • transform-decorators (legacy).

Environment specific plugins:

test

development

production

0.0.0

3 years ago

4.78.0

4 years ago

4.76.0

4 years ago

4.57.2

4 years ago

4.51.1

4 years ago

4.45.1

4 years ago

4.37.1

4 years ago

4.23.0

4 years ago

4.22.0

4 years ago

4.21.9

4 years ago

4.21.6

4 years ago

4.21.1

4 years ago

4.14.0

5 years ago

4.13.0

5 years ago

4.12.0

5 years ago

4.10.2

5 years ago

4.1.0

5 years ago

4.1.0-rc.4

5 years ago

4.1.0-rc.3

5 years ago

4.1.0-rc.2

5 years ago

4.1.0-rc.1

5 years ago

4.1.0-rc.0

5 years ago

4.1.0-alpha.7

5 years ago

4.1.0-alpha.6

5 years ago

4.1.0-alpha.5

5 years ago

4.1.0-alpha.4

5 years ago

4.1.0-alpha.3

5 years ago

4.1.0-alpha.2

5 years ago

4.1.0-alpha.1

5 years ago

4.1.0-alpha.0

5 years ago

4.0.0-alpha.0

5 years ago

4.0.0

5 years ago

3.17.0

6 years ago

3.16.0

6 years ago

3.12.0

6 years ago

3.1.2

6 years ago

3.0.0

6 years ago

3.0.0-rc.1

6 years ago

3.0.0-rc.0

6 years ago

3.0.0-beta.2

6 years ago

3.0.0-beta.1

6 years ago

3.0.0-beta.0

6 years ago

3.0.0-alpha.13

6 years ago

3.0.0-alpha.12

6 years ago

3.0.0-alpha.11

6 years ago

3.0.0-alpha.10

6 years ago

3.0.0-alpha.9

6 years ago

3.0.0-alpha.8

6 years ago

3.0.0-alpha.7

6 years ago

3.0.0-alpha.6

6 years ago

3.0.0-alpha.5

6 years ago

3.0.0-alpha.4

6 years ago

3.0.0-alpha.3

6 years ago

3.0.0-alpha.2

6 years ago

2.4.0

6 years ago

2.1.8

6 years ago