4.4.0 • Published 1 month ago

@jitesoft/babel-preset-react v4.4.0

Weekly downloads
22
License
MIT
Repository
gitlab
Last release
1 month ago

@jitesoft/babel-preset-react

npm (scoped) Known Vulnerabilities pipeline status npm Back project

React preset for Jitesoft javascript projects which uses babel.

Includes the following presets and plugins:

@jitesoft/preset-main
@babel/plugin-transform-react-display-name
@babel/plugin-transform-react-jsx
@babel/plugin-syntax-jsx

@babel/plugin-transform-react-inline-elements *
@babel/plugin-transform-react-constant-elements *
@babel/plugin-transform-react-jsx-compat *

* Packages will only be used if they are added to the include array of the options object.

If babel is in development mode, the following plugins will be enabled:

@babel/plugin-transform-react-jsx-source
@babel/plugin-transform-react-jsx-self

Requires corejs (v 3+) and @babel/core.

Options

Other than the default presets in @jitesoft/babel-preset-main, the following options are available:

  • useBuiltIns (boolean) - Use built ins instead of polyfill. Uses same value as passed for the main preset (defaults to false).
  • include (array) - Addition for the three plugins marked with * in the above list (defaults to empty array).

The following options are prefixed with 'react' and corresponds to the options of the transform-react-jsx plugin.
(Prefixed with react. since v2.0.0).

  • react.useSpread (boolean) - Uses js props spread instead of babel helper. Defaults to false.
  • react.throwIfNamespace (boolean) - Makes babel throw an error if using xml namespaces. Defaults to true.
  • react.runtime (string) - classic or automatic, defaults to classic.

if runtime is set to classic (default) the following options are available:

  • react.pragma (string) - Defines which create element method to use. Defaults to React.createElement.
  • react.pragmaFrag (string) - Defines which Fragment component to use. Defaults to React.Fragment.

if runtime is set to automatic the following options are available:

  • react.importSource (string) - defaults to react.
4.4.0

1 month ago

4.3.2

4 months ago

4.2.1

9 months ago

4.2.0

10 months ago

4.3.1

6 months ago

4.3.0

7 months ago

4.1.1

1 year ago

4.0.0

1 year ago

4.1.0

1 year ago

3.1.3

1 year ago

3.1.2

1 year ago

3.1.1

1 year ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.1.0

2 years ago

2.0.5

2 years ago

3.0.0

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.4

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.18.1

2 years ago

1.18.0

2 years ago

1.17.0

2 years ago

1.16.0

2 years ago

1.15.0

3 years ago

1.14.1

3 years ago

1.14.0

3 years ago

1.13.1

3 years ago

1.13.0

3 years ago

1.12.4

3 years ago

1.12.3

3 years ago

1.12.2

3 years ago

1.12.1

3 years ago

1.12.0

3 years ago

1.11.1

3 years ago

1.11.0

3 years ago

1.10.1

3 years ago

1.9.0

3 years ago

1.8.1

3 years ago

1.8.0

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.0

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago