Skip to content

boopathi/fallback-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fallback-loader

NOT COMPLETE. UNDER DEVELOPMENT

A webpack fallback loader

Usage

let fallback = require('fallback-loader');

let loaders = [
  {
    test: /\.png/,
    loader: fallback('image-size?minSize=5000', 'file')
  }
]

Concept

fallback('image-size?minSize=5000', 'file')
  • Executes image-size-loader with the loader context under try block
  • Captures error thrown from the loader (both sync and async) - throw err & callback(err)
  • Executes the fallback - file-loader

About

A fallback loader for webpack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published