Skip to content

evgygor/webpack-prepend-append

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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; '}'
          }
        }
      ]
    }
}

Licence:

MIT

About

Webpack loader to append text to files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%