0.0.1 • Published 7 years ago

strip-modules-names-loader v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

#Strip modules names loader Webpack loader for stripping names from ES6 modules.

Loader has the same purpose as add-module-exports plugin. It removes modules names from exports. Plugin will affect all the imports, but loader could be used to separately for specific files.

It is advised to have only one default export If you have several named exports from file all of them will be ignored.

##Example

Existing file

export default {
  a: 1,
  b: true
}

const c = {c: 2}
export {
  c
}

Normal Babel v6 modules output

exports.default = {
  a: 1,
  b: true
};
exports.c = c;

Loader modules output

module.exports = {
  a: 1,
  b: true
};
exports.c = c;