Exports Loader
Switch branches/tags
Nothing to show
Clone or download
buffcode and evilebottnawi docs(readme): fix CONTRIBUTING link (#25)
Link to CONTRIBUTING is incorrect
Latest commit d43d199 Jul 11, 2018

README.md

npm node deps tests chat

exports-loader

exports loader module for webpack

Requirements

This module requires a minimum of Node v6.9.0 and Webpack v4.0.0.

Getting Started

To begin, you'll need to install exports-loader:

$ npm install exports-loader --save-dev

Then add the loader to the desired require calls. For example:

require('exports-loader?file,parse=helpers.parse!./file.js');
// adds the following code to the file's source:
//  exports['file'] = file;
//  exports['parse'] = helpers.parse;

require('exports-loader?file!./file.js');
// adds the following code to the file's source:
//  module.exports = file;

require('exports-loader?[name]!./file.js');
// adds the following code to the file's source:
//  module.exports = file;

And run webpack via your preferred method.

Contributing

Please take a moment to read our contributing guidelines if you haven't yet done so.

CONTRIBUTING

License

MIT