Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

monic-loader

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monic-loader

Using Monic with WebPack.

Source
npmnpm
Version
2.2.5
Version published
Weekly downloads
18
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

monic-loader

Using Monic with WebPack.

NPM version NPM dependencies NPM devDependencies Build Status

Install

npm install monic monic-loader --save-dev

Usage

webpack.config.json

var webpack = require('webpack');

webpack({
  entry: {
      index: './index.js'
  },

  output: {
      filename: '[name].bundle.js'
  },

  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        loader: 'monic-loader?flags=ie:7|develop&labels=full|baz'
      }
    ]
  },

  monic: {
    replacers: [
      // Replaces require to #include
      // ("this" refers to the instance of the compiler)
      function (text, file) {
        return text.replace(/^\s*require\('(.*?)'\);/gm, '//#include $1');
      }
    ]
  }

}, function (err, stats) {
    // ...
});

Options

License

The MIT License.

Keywords

webpack

FAQs

Package last updated on 13 Jul 2016

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