https://github.com/komlev/strip-modules-names-loader
Strip modules names loader for webpack
https://github.com/komlev/strip-modules-names-loader
Last synced: about 10 hours ago
JSON representation
Strip modules names loader for webpack
- Host: GitHub
- URL: https://github.com/komlev/strip-modules-names-loader
- Owner: komlev
- Created: 2016-12-21T16:36:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-21T16:41:22.000Z (over 8 years ago)
- Last Synced: 2025-05-29T13:48:57.308Z (13 days ago)
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#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
```js
export default {
a: 1,
b: true
}const c = {c: 2}
export {
c
}
```Normal Babel v6 modules output
```js
exports.default = {
a: 1,
b: true
};
exports.c = c;
```Loader modules output
```js
module.exports = {
a: 1,
b: true
};
exports.c = c;
```[Webpack]: http://webpack.github.io/
[add-module-exports]: https://github.com/59naga/babel-plugin-add-module-exports