Socket
Socket
Sign inDemoInstall

gatsby-plugin-compile-es6-packages

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-compile-es6-packages

Easily add support for compiling ES6 packages into Gasby projects


Version published
Weekly downloads
8.9K
decreased by-3.2%
Maintainers
1
Weekly downloads
 
Created
Source

gatsby-plugin-compile-es6-packages

npm version npm downloads

Allows you to easily specify npm modules to be included in transpiling with babel.

This plugin works with Gatsby V2+

Discussion of this issue at https://github.com/gatsbyjs/gatsby/issues/3780

Install

npm install --save gatsby-plugin-compile-es6-packages

or

yarn add gatsby-plugin-compile-es6-packages

How to use

Add the plugin to your gatsby-config.js. Specify the npm modules containing ES6 code that require transpilation.

plugins: [
  {
    resolve: `gatsby-plugin-compile-es6-packages`,
    options: {
      modules: [`query-string`]
    }
  }
];

Options

OptionExplanationDefaultRequired
modulesSpecify the npm modules containing ES6 code that require transpilation[]YES
testAdjusts the regex for the webpack rule/\.js$/NO

You may also need to use other plugins to handle any specific babel config to transpile the es6 code (i.e. gatsby-plugin-flow)

Keywords

FAQs

Package last updated on 25 Jul 2019

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