Skip to content

localjo/shell-loader

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

NPM Status

Shell Loader

A Webpack loader for running arbitrary shell scripts when loading files.

Install

npm install --save-dev shell-loader

Usage

Documentation: Using loaders

Add shell-loader your Webpack configuration object, setting options.script to the shell script you want to run on each file. Example;

module: {
  rules: [
    {
      test: /.*\.css$/,
      use: [ 'css-loader', { loader: 'shell-loader', options: {
        script: 'postcss --use autoprefixer'
      }} ]
    }
  ]
}