1.0.2 • Published 7 years ago

if-loader v1.0.2

Weekly downloads
68
License
MIT
Repository
github
Last release
7 years ago

if-loader

This is a preprocesser for the webpack module bundler. It support the ' if ' directive,similar to C ' #ifdef '

Usage

see example.js

//common
var ab = {
  a : 9,
  b : 100
}

/* #if version-b */
(function(){
 "A can't see this"
})()
/* #end */

/* #if version-a */
(function(){
 "B can't see this"
})()
/* #end */

// #if version-b,version-c
(function(){
 "A can't see this"
})()
// #end

// #if version-a,version-c
(function(){
 "B can't see this"
})()
// #end