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

babel-preset-modern-browser-extension

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-preset-modern-browser-extension

Babel preset used for creating browser extensions. Supports React and TypeScript.

  • 0.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
58
increased by56.76%
Maintainers
1
Weekly downloads
 
Created
Source

babel-preset-modern-browser-extension npm

Babel preset used for creating browser extensions. Supports React and TypeScript.

Usage

npm i babel-preset-modern-browser-extension --save-dev

In your .babelrc (or any other Babel config file) file, add:

{
  "presets": ["modern-browser-extension"]
}

Includes

"dependencies": {
  "@babel/plugin-proposal-decorators"
  "@babel/plugin-syntax-dynamic-import"
  "@babel/preset-env"
  "@babel/preset-react"
  "@babel/preset-typescript"
  "babel-plugin-react-require"
  "babel-plugin-transform-react-remove-prop-types"
}

Options

mode

The bundle mode.

"production" | "development", defaults to "development"

{
  "presets": [["modern-extensions", {"mode": "development"}]]
}

targets

Target used by Babel. Relies on browserlist

{ [string]: number | string }, defaults to last 1 version of each browser.

{
  "presets": [
    [
      "modern-extensions",
      {
        "targets": {
          "chrome": "last 1 version",
          "edge": "last 1 version",
          "firefox": "last 1 version",
          "opera": "last 1 version",
          "safari": "last 1 version",
          "samsung": "last 1 version"
        }
      }
    ]
  ]
}

debug

Enable Babel debug mode.

boolean, defaults to false

{
  presets: [['modern-extensions', {debug: false}]]
}

typescript

Whether or not to use TypeScript.

boolean, defaults to false

{
  presets: [['modern-extensions', {typescript: false}]]
}

License

MIT (c) Cezar Augusto.

Keywords

FAQs

Package last updated on 18 Mar 2024

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