fork from git+https://github.com/jdmichaud/preprocessor-loader.git
'cause author stop maintaining this project, and my issue was left to open for a while
// webpack.config.js
{
module: {
loaders: [
{ test: /\.js$/,
loader: 'pprocessor?config=pprocessor-loader.json',
exclude: [/bower_components/, /node_modules/],
},
],
}
}
// pprocessor-loader.json
"macros": [
{
"declaration" : "LOG_INFO(message)",
"definition" : "console.log(message + ' (__FILE__:__LINE__)');",
"reg": "(?=src/)(.*)"
},
]