# rollup-plugin-bundle-cep-manifest

> Bundles /CSXS/manifest.xml to dist

Latest version **1.0.1** (published 2023-04-28) · 0 weekly downloads

## Install

```sh
npm install rollup-plugin-bundle-cep-manifest
pnpm add rollup-plugin-bundle-cep-manifest
yarn add rollup-plugin-bundle-cep-manifest
bun add rollup-plugin-bundle-cep-manifest
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-04-28 |
| First published | 2023-03-06 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 4 |
| Unpacked size | 36.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | goodboyninja |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-bundle-cep-manifest
- npm.io page: https://npm.io/package/rollup-plugin-bundle-cep-manifest

## Dependencies (4)

- [fs-extra](https://npm.io/package/fs-extra.md) ^11.1.0
- [path-browserify](https://npm.io/package/path-browserify.md) ^1.0.1
- [recursive-readdir](https://npm.io/package/recursive-readdir.md) ^2.2.3
- [vite-plugin-node-polyfills](https://npm.io/package/vite-plugin-node-polyfills.md) ^0.7.0

## Recent versions

- 1.0.1 (latest) — 2023-04-28
- 1.0.0 — 2023-03-06

## README

# rollup-plugin-bundle-cep-manifest
### A Rollup plugin to bundle the CSXS folder, including the manifest.xml file, to the dist folder.

It also updates the paths in the `manifest.xml` file to match the new location of the files in the `dist` folder. For example:
    



*Tip: Better used with Vite :)*

# Installation
```js
npm install rollup-plugin-bundle-cep-manifest
```

# Usage

With Rollup (rollup.config.js):
```js
import { bundleManifest } from 'rollup-plugin-bundle-cep-manifest';

export default {
    plugins: [
        bundleManifest(),
    ],
};
```

With Vite (vite.config.js):
```js
import { defineConfig } from 'vite';
import { bundleManifest } from 'rollup-plugin-bundle-cep-manifest';

export default defineConfig({
    build: {
        rollupOptions: {
            plugins: [
                bundleManifest(),
            ],
        },
    }
});
```

<br><br>

## Automatic
The plugin updates the paths in the `manifest.xml` file to match the new location of the files in the `dist` folder. For example:


```xml
<MainPath> ./index-dev.html </MainPath>
```
becomes

```xml
<MainPath> ./index.html </MainPath>
```

When used with `Vite` the plugin does a better job at updating the paths, since it knows the final location of the files (Vite bundles html files by default).

When used with Rollup, the plugin will try its best and guess the final location of the files, but it might fail. In that case, you can manually remap the paths (see below).


## Manual

To manually convert the paths in your `manifest.xml` file, you can use the `remap` option:

```js
bundleManifest({
    {
    remap: {
        "./index-dev.html": "./index.html",
    }
}),
```

Note that the final paths (those on the right) should be relative to the `dist` folder.

You can specify more than one path to remap:
```js
bundleManifest({
    {
    remap: {
        "./index-dev.html": "./index.html",
        "./other-index-dev": "./other-index.js",
    }
}),
```


Enjoy :)

---
_Source: https://npm.io/package/rollup-plugin-bundle-cep-manifest · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
