# webpack-plugin-object-entries-and-values-to-object-keys

> Add Object.values and Object.entries polyfill to entries

Latest version **0.1.2** (published 2019-09-18) · MIT license · 1 weekly downloads

## Install

```sh
npm install webpack-plugin-object-entries-and-values-to-object-keys
pnpm add webpack-plugin-object-entries-and-values-to-object-keys
yarn add webpack-plugin-object-entries-and-values-to-object-keys
bun add webpack-plugin-object-entries-and-values-to-object-keys
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2019-09-18 |
| First published | 2019-09-18 |
| Weekly downloads | 1 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ningzbruc@gmail.com |
| Maintainers | kingback |
| Keywords | object, values, entries, webpack, plugin |

## Links

- npm: https://www.npmjs.com/package/webpack-plugin-object-entries-and-values-to-object-keys
- Repository: https://github.com/kingback/webpack-plugin-object-entries-and-values-to-object-keys
- Homepage: https://github.com/kingback/webpack-plugin-object-entries-and-values-to-object-keys#readme
- Issues: https://github.com/kingback/webpack-plugin-object-entries-and-values-to-object-keys/issues
- npm.io page: https://npm.io/package/webpack-plugin-object-entries-and-values-to-object-keys

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2019-09-18
- 0.1.1 — 2019-09-18
- 0.1.0 — 2019-09-18

## README

# webpack-plugin-object-entries-and-values-to-object-keys

> Add Object.values and Object.entries polyfill to entries

Inspired by [babel-plugin-object-entries-and-values-to-object-keys](https://www.npmjs.com/package/babel-plugin-object-entries-and-values-to-object-keys), sometimes babel does not process dependencies which were excluded, so we need to add polyfill at the top of webpack entry files.

## How to use

```js
// webpack.config.js
const webpack = require('webpack');
const WebpackObjectPolyfillPlugin = require('webpack-plugin-object-entries-and-values-to-object-keys');

module.exports = {

  // Sometimes babel-plugin-object-entries-and-values-to-object-keys doesn't works on node_modules
  module: {
    rules: [
      {
        test: /js/,
        loader: 'babel-loader',
        exclude: /node_modules/,
        options: {
          plugins: ['babel-plugin-object-entries-and-values-to-object-keys']
        }
      }
    ]
  },

  // So we use webpack-plugin-object-entries-and-values-to-object-keys to fix this
  plugins: [
    new WebpackObjectPolyfillPlugin(webpack)
  ]
};
```

---
_Source: https://npm.io/package/webpack-plugin-object-entries-and-values-to-object-keys · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
