Value Loader for Webpack
Like val-loader but runs file in a child compiler.
Works with babel and TypeScript.
Install
npm install --save-dev value-loader
Usage
let a = ;// => excute file.js while compiling and// take the result as javascript code for including
This loader is also useful if you want to provide data for another loader:
;
Or if you like to generate a json export similar to the tojson-loader, but with loaders executed:
;
Config
Instead of getting the whole exports
object you can set name
to the
named export you want to retrieve.
;
Acknowledgement
This work is heavily based on the work done by Nathan Tran for css-in-js-loader.
License
MIT