Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luisherranz/webpack-lodash-plugin-problem
https://github.com/luisherranz/webpack-lodash-plugin-problem
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/luisherranz/webpack-lodash-plugin-problem
- Owner: luisherranz
- Created: 2016-08-26T15:59:09.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-26T16:00:26.000Z (about 8 years ago)
- Last Synced: 2024-10-15T22:15:26.371Z (about 1 month ago)
- Language: JavaScript
- Size: 42 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Open `dist/index.html` and look at the console.
The expected output after applying:
```javascript
const mapPkgs = flow(
keyBy(pkg => pkg.name),
mapValues(pkg => pkg.value)
);
```
to this
```javascript
const pkgs = [
{
name: 'pkg1',
value: 1,
},
{
name: 'pkg2',
value: 2,
},
];
```
should be:
```javascript
{
pkg1: 1,
pkg2: 2,
}
```
which is true with `LodashModuleReplacementPlugin` turned off.If you turn it on, the returned object is empty (`{}`).
I've tried both `currying` and `flattening` and I tried using `flow([func1, func2])` as well.
You can use `npm start` to run webpack and generate a new `bundle.js`.