wrap-loader

0.2.0 • Public • Published

Wrap loader for webpack Version Build Status

Adds custom content before and after the loaded source.

Installation

$ npm install --save wrap-loader

Usage

Documentation: Using loaders

In your webpack.config.js file:

module.exports = {
  module: {
    loaders: [{
      test:   /\.less$/,
      loader: 'style!css!less!wrap?less'
    }]
  },
 
  wrap: {
    less: {
      before: [
        '@import "~bootstrap/less/variables.less";',
        '@import "~bootstrap/less/mixins.less";'
      ],
      after: '@import "~utils/debug.less";'
    }
  }
};

Meta

Contributors

License

Copyright (c) 2014 Daniel Perez Alvarez (unindented.org). This is free software, and may be redistributed under the terms specified in the LICENSE file.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    2,035
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    2,035
  • 0.1.0
    30
  • 0.0.2
    2
  • 0.0.1
    0

Package Sidebar

Install

npm i wrap-loader

Weekly Downloads

2,067

Version

0.2.0

License

none

Last publish

Collaborators

  • unindented