package
Loader for sweetjs macros
npm install sweetjs-loaderGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 3 packages.
660.6 kB
Includes dependencies.
Use it like any other loader.
It takes a query string that contains sweetjs compiler options. The ones you most likely care about:
Applies the macros in macros.sjs to all .js files.
module.exports = {
cache: true,
entry: 'app.js',
output: {
filename: 'bundle.js'
},
module: {
loaders: [{
test: /\.js$/, loader: 'sweetjs?modules[]=./macros.sjs,readers[]=reader-mod'
}]
}
};jlongster
longster@gmail.com