New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel6-plugin-remove-imports

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel6-plugin-remove-imports

Strips import declarations for configured modules from babel6 output

  • 6.1.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Strip Filtered Imports

This plugin enables you to strip individual import declarations or specifiers when stripping code paths from a build.

For instance, you may use babel-plugin-filter-imports to remove some modules from a production build. This plugin will additionally filter a list of import declarations or specifiers that you wish to remove in conjunction with the above plugin.

API

"use strict";
// ...
const FilterImports = require('babel-plugin-filter-imports');
const StripFilteredImports = require('babel6-plugin-remove-imports');

const filteredImports = {
  'a-module-name': [
    'an-export',
    'another-export'
  ],
  'another-module-name': '*',
  'yet-another/module': true
};

// ...

new Babel('<some-path>', {
  plugins: [ 
    [FilterImports, filteredImports],
    [StripFilteredImports, filteredImports],
  ]
});

Keywords

FAQs

Package last updated on 19 Sep 2017

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