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

interpolate-loader-options-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

interpolate-loader-options-webpack-plugin

Webpack plugin to interpolate options for webpack loaders

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
65
increased by170.83%
Maintainers
1
Weekly downloads
 
Created
Source

interpolate-loader-options-webpack-plugin

Webpack plugin to interpolate strings within loader options.

Install

npm install --save-dev interpolate-loader-options-webpack-plugin

Usage

Once installed, can be used in your webpack configuration file

const InterpolateLoaderOptionsPlugin = require('interpolate-loader-options-webpack-plugin');

module.exports = {
  ...
  module: {
    rules: [
      {
        test: /\.js$/,
        use: [
        {
          loader: 'my-loader',
           options: {
             value: 123,
             interpolated: '[name]'
             nested: {
               arrays:[
                 {
                   value:'sdff'
                 },
                 {
                   value: '[path]'
                 }
               ]
             }
           }
         }
        ]
      }
    ]
  }
  plugins: [
    ...
    new InterpolateLoaderOptionsPlugin({
      // Optional Array<Object>
      loaders: [{
        // Required String
        name: 'my-loader',

        // Optional Array<String>
        include: ['nested.arrays.1.value']
      }]
    })
  ]
};
options
loaders Array<Object>

This property is optional.
Defines an array of loader configurations on how to interpolate each loader.
Each loader configuration must have a name that corresponds to a name of a loader.
Each loader configuration can have an include array of property paths within the options that need to be interpolated.

Keywords

FAQs

Package last updated on 10 Mar 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