Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nuxt/babel-preset-app

Package Overview
Dependencies
Maintainers
3
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxt/babel-preset-app

babel-preset-app for nuxt

  • 2.15.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
84K
decreased by-55.25%
Maintainers
3
Weekly downloads
 
Created

What is @nuxt/babel-preset-app?

@nuxt/babel-preset-app is a Babel preset specifically designed for Nuxt.js applications. It provides a set of Babel plugins and configurations optimized for Nuxt.js, enabling developers to write modern JavaScript code that is transpiled to be compatible with older browsers.

What are @nuxt/babel-preset-app's main functionalities?

Transpile modern JavaScript

This feature allows you to transpile modern JavaScript (ES6/ES7) to ES5, making it compatible with older browsers. By including '@nuxt/babel-preset-app' in your Babel configuration, you ensure that your code is processed with the appropriate plugins and settings for Nuxt.js.

module.exports = {
  presets: [
    '@nuxt/babel-preset-app'
  ]
};

Automatic polyfills

This feature automatically includes polyfills based on your code usage. By setting 'useBuiltIns' to 'usage' and specifying the core-js version, you ensure that only the necessary polyfills are included, optimizing the bundle size.

module.exports = {
  presets: [
    ['@nuxt/babel-preset-app', {
      useBuiltIns: 'usage',
      corejs: 3
    }]
  ]
};

Custom Babel plugins

This feature allows you to add custom Babel plugins to your configuration. In this example, the '@babel/plugin-proposal-class-properties' plugin is added to support class properties syntax in your JavaScript code.

module.exports = {
  presets: [
    '@nuxt/babel-preset-app'
  ],
  plugins: [
    '@babel/plugin-proposal-class-properties'
  ]
};

Other packages similar to @nuxt/babel-preset-app

FAQs

Package last updated on 15 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc