npm

Does your artifact manager get in the way? Join us on Oct. 8 at 10am PT, to discuss how npm can help.Sign up »

babel-preset-expo

7.0.0 • Public • Published

babel-preset-expo

If you have problems with the code in this repository, please file issues & bug reports at https://github.com/expo/expo. Thanks!

Options

lazyImports

Changes Babel's compiled import statements to be lazily evaluated when their imported bindings are used for the first time.

Note: this option has an effect only when the disableImportExportTransform option is set to false. On Android and iOS, disableImportExportTransform defaults to false, and on web it defaults to true to allow for tree shaking.

This can improve the initial load time of your app because evaluating dependencies up front is sometimes entirely un-necessary, particularly when the dependencies have no side effects.

The value of lazyImports has a few possible effects:

default: null

[
    'babel-preset-expo',
    {
        lazyImports: true
    }
],

web.disableImportExportTransform

Enabling this option will allow your project to run with older JavaScript syntax (i.e. module.exports). This option will break tree shaking and increase your bundle size, but will eliminate the following error when module.exports is used:

TypeError: Cannot assign to read only property 'exports' of object '#<Object>'

default: false

[
    'babel-preset-expo',
    {
        web: { disableImportExportTransform: true }
    }
],

install

npm i babel-preset-expo

Downloadsweekly downloads

65,212

version

7.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability