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

import-glob-loader

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

import-glob-loader

Globbing preloader for Webpack

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22K
increased by8.37%
Maintainers
1
Weekly downloads
 
Created
Source

import-glob-loader

Globbing preloader for Webpack

Expands globbing patterns for import statements. Currently only does vertical expansion, e.g.

@import "foo/**/*";

Expands into

@import "foo/1.scss";
@import "foo/bar/2.scss";
@import "foo/bar/3.scss";

Install

npm install import-glob-loader --save-dev

Usage

You can use it one of two ways, the recommended way is to use it as a preloader for files you know has import statements. This usually applies to ES6 module import statements, CSS @import at-rules, and Sass @import statements.

{
  module: {
    preloaders: [{
      test: /\.scss/,
      loader: 'import-glob-loader'
    }]
  }
}

Alternatively you can use it as a chained loader

require('style!css!sass!import-glob!foo/bar.scss')

Options

All options are passthrough to node-glob. import-glob comes with two additional options.

  • test = 'import' The test for globbing to be applied. Lines matching test will be expanded. (This is a word-boundary test, so import will match @import but not importScript, for example)
  • delimiter = '\n' The delimiter used to join expanded globs.

Keywords

FAQs

Package last updated on 13 Jul 2015

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