@shoutem/webpack-prepend-append
v1.0.1
Published
Simple loader to append/prepend text to files (useful for adding file headers)
Downloads
91
Maintainers
Readme
Webpack loader to prepend/append text to files
Prepend/append text to the contents loaded by the loader. Useful to add headers, footers or to wrap all your files in the webpack pipeline.
Install:
$ npm install --save-dev @shoutem/webpack-prepend-append
Usage:
Add the loader to your webpack.config.js
:
module.exports = {
// ...
module: {
loaders: [
// ...
{
test: /\.js$/,
loader: '@shoutem/webpack-prepend-append',
query: {
prepend: 'Header text',
append; 'Footer text'
}
}
]
}
}
module.exports = {
// ...
module: {
loaders: [
// ...
{
test: /\.js$/,
loader: '@shoutem/webpack-prepend-append',
query: {
prepend: 'WrapItIntoBlock {',
append; '}'
}
}
]
}
}