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

rollup-plugin-ignore-import

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-ignore-import

Ignore import rollup plugin

  • 1.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source
travis build license npm version

rollup-plugin-ignore-import

Ignore import depending on the file extension. Useful when running

Installation

Via Yarn

yarn add rollup-plugin-ignore-import --save-dev

Via NPM

npm install rollup-plugin-ignore-import --save-dev

Usage

Using extensions

// rollup.config.js
import ignoreImport from 'rollup-plugin-ignore-import';

export default {
  entry: 'entry.js',
  dest: 'bundle.js',
  plugins: [
    ignoreImport({
      // Ignore all .scss and .css file imports while building the bundle
      extensions: ['.scss', '.css'],
      // Optional: replace body for ignored files. Default value is "export default undefined;"
      body: 'export default undefined;'
    })
  ]
}

Using include

// rollup.config.js
import ignoreImport from 'rollup-plugin-ignore-import';

export default {
  entry: 'entry.js',
  dest: 'bundle.js',
  plugins: [
    ignoreImport({
      // Ignore all .scss and .css file imports while building the bundle
      include: ['**/*.scss', '**/*.css'],
      // Optional: replace body for ignored files. Default value is "export default undefined;"
      body: 'export default undefined;'
    })
  ]
}

License

This software is licensed under the MIT License

Keywords

FAQs

Package last updated on 09 Oct 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