action-comment-loader
v0.0.1
Published
Action comment for Webpack2
Downloads
1
Maintainers
Readme
Action Comment loader
For webpack2 This is a loader for action comment, to know about the action comment, go on link
Install
npm i --save-dev action-comment-loader
Use
Example
//...
module: {
rules: [
{ test: /\.(js|vue|stylus|pug)$/,
loader: 'action-comment-loader',
'options': {
'handles': {
alert(line, index){
return `alert("${line} in line ${index}")`;
}
}
}
}
//...
With acHandles.js
//...
module: {
rules: [
{ test: /\.(js|vue|stylus|pug)$/,
loader: 'action-comment-loader',
'options': {
'handles': require("./acHandles.js")
}
}
}
//...