# entrypoint-assets-webpack-plugin

> Exports a mapping of entries to public paths of chunks

Latest version **1.2.0** (published 2017-12-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install entrypoint-assets-webpack-plugin
pnpm add entrypoint-assets-webpack-plugin
yarn add entrypoint-assets-webpack-plugin
bun add entrypoint-assets-webpack-plugin
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2017-12-13 |
| First published | 2017-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Klavs Prieditis |
| Maintainers | geta |
| Keywords | webpack, entrypoint, asset, plugin, entry |

## Links

- npm: https://www.npmjs.com/package/entrypoint-assets-webpack-plugin
- Repository: https://github.com/Geta/entrypoint-assets-webpack-plugin
- Issues: https://github.com/Geta/entrypoint-assets-webpack-plugin/issues
- npm.io page: https://npm.io/package/entrypoint-assets-webpack-plugin

## Dependencies (1)

- [webpack-core](https://npm.io/package/webpack-core.md) ^0.6.9

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 1.2.0 (latest) — 2017-12-13
- 1.1.0 — 2017-03-31
- 1.0.0 — 2017-03-29

## README

# entrypoint-assets-webpack-plugin

Exports a JSON file that maps entry names to public paths of chunks for an entry grouped by chunk file extensions.
```json
{
    "site": {
        "js": [
            "/public/common.js",
            "/public/site.js"
        ],
        "css": [
            "/public/common.css",
            "/public/site.css"
        ]
    },
    "admin": {
        "js": [
            "/public/common.js",
            "/public/admin.js"
        ],
        "css": [
            "/public/common.css",
            "/public/admin.css"
        ]
    }
}
```

This mapping can then be used to generate import assets in HTML by entry name not the asset names.


## Usage

Install via npm:

```shell
npm install entrypoint-assets-webpack-plugin
```

Usage example:

```javascript
const webpack = require('webpack')
const EntrypointAssetsPlugin = require('entrypoint-assets-webpack-plugin')

module.exports = {
    entry: {
        "site": "./site",
        "admin": "./admin"
    },
    plugins: [
        new webpack.optimize.CommonsChunkPlugin({
            name: "common",
            chunks: ["site", "admin"]
        }),
        new EntrypointAssetsPlugin()
    ]
};
```

### Options

#### `filename`
**Default**:`"entrypoints.json"`

Exported entrypoints filename.

#### `mappings`
**Default**:
```js
{
    "js": /\.js$/,
    "map": /\.map$/,
    "css": /\.css$/
}
```
Groups assets by regexp.

---
_Source: https://npm.io/package/entrypoint-assets-webpack-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
