node package manager

val-loader

val loader module for webpack

npm deps chat

Val Loader

Provides data to another loader

Install

npm i val-loader --save

Usage

var a = require("val-loader!./file.js");
// => excute file.js while compiling and  
//    take the result as javascript code for including 

Don't forget to polyfill require if you want to use it in node. See webpack documentation.

The excution of file.js has polyfill already applied.

Provide data for another loader:

require("css-loader!val-loader!./generateCss.js");

Maintainers


Juho Vepsäläinen

Joshua Wiens

Kees Kluskens

Sean Larkin