New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

webpack-loader-api-exec

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

webpack-loader-api-exec

Replace this.exec inside webpack loader

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
8
166.67%
Maintainers
1
Weekly downloads
 
Created
Source

Webpack-loader-api-exec

Since webpack team deprecate usage this.exec inside Loader Api we need in something that could execute code string as normal javascript. This module provide similar functionality

Usage

const exec = require('webpack-loader-api-exec');

module.exports = function(code) {
    const ctx = {}
    const opts = {}
    const content = (typeof code === 'string')
        ? exec(code, opts, ctx)
        : code;

    // process content
    // ...

    return result;
}

Keywords

webpack

FAQs

Package last updated on 02 Mar 2018

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