# @carv/snowpack-plugin-rollup

> Use rollup to bundle your application for production.

Latest version **1.4.1** (published 2020-08-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @carv/snowpack-plugin-rollup
pnpm add @carv/snowpack-plugin-rollup
yarn add @carv/snowpack-plugin-rollup
bun add @carv/snowpack-plugin-rollup
```

## 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.4.1 |
| Published | 2020-08-24 |
| First published | 2020-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.4 |
| Dependencies | 18 |
| Unpacked size | 33.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Sascha Tandel |
| Maintainers | sastan |

## Links

- npm: https://www.npmjs.com/package/@carv/snowpack-plugin-rollup
- Repository: https://github.com/carvjs/snowpack
- Homepage: https://github.com/carvjs/snowpack#readme
- Issues: https://github.com/carvjs/snowpack/issues
- npm.io page: https://npm.io/package/@carv/snowpack-plugin-rollup

## Dependencies (18)

- [execa](https://npm.io/package/execa.md) ^4.0.1
- [globby](https://npm.io/package/globby.md) ^11.0.1
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [rollup](https://npm.io/package/rollup.md) ^2.18.0
- [find-up](https://npm.io/package/find-up.md) ^4.1.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^9.0.1
- [ast-matcher](https://npm.io/package/ast-matcher.md) ^1.1.1
- [magic-string](https://npm.io/package/magic-string.md) ^0.25.7
- [npm-run-path](https://npm.io/package/npm-run-path.md) ^4.0.1
- [rollup-plugin-dts](https://npm.io/package/rollup-plugin-dts.md) ^1.4.7
- [@rollup/plugin-json](https://npm.io/package/@rollup/plugin-json.md) ^4.1.0
- [@rollup/plugin-yaml](https://npm.io/package/@rollup/plugin-yaml.md) ^2.1.1
- [@rollup/pluginutils](https://npm.io/package/@rollup/pluginutils.md) ^3.1.0
- [rollup-plugin-svelte](https://npm.io/package/rollup-plugin-svelte.md) ^5.2.3
- [rollup-plugin-esbuild](https://npm.io/package/rollup-plugin-esbuild.md) ^2.1.0
- [project-root-directory](https://npm.io/package/project-root-directory.md) ^1.0.3
- [@rollup/plugin-commonjs](https://npm.io/package/@rollup/plugin-commonjs.md) ^13.0.0
- [@rollup/plugin-node-resolve](https://npm.io/package/@rollup/plugin-node-resolve.md) ^8.1.0

## Recent versions

- 1.4.1 (latest) — 2020-08-24
- 1.4.0 — 2020-08-12
- 1.3.17 — 2020-07-13
- 1.3.16 — 2020-07-13
- 1.3.14 — 2020-07-10
- 1.3.13 — 2020-07-07
- 1.3.12 — 2020-07-06
- 1.3.11 — 2020-07-06
- 1.3.10 — 2020-07-06
- 1.3.9 — 2020-07-06
- 1.3.8 — 2020-07-06
- 1.3.7 — 2020-07-06
- 1.3.6 — 2020-07-06
- 1.3.5 — 2020-07-05
- 1.3.4 — 2020-07-05
- … 11 more at https://npm.io/package/@carv/snowpack-plugin-rollup/versions

## README

# @carv/snowpack-plugin-rollup

Use rollup to bundle your application for production.

```
npm install --save-dev @carv/snowpack-plugin-rollup
```

```js
// snowpack.config.json
{
  "plugins": ["@carv/snowpack-plugin-rollup"]
}
```

## Features

- CSS files are injected into the document head via a style tag.
- Converts JSON files to ES6 modules.
- Converts YAML files to ES6 modules.
- All other imported files copied and are exported using the URL path.

  ```js
  import img from './image.png' // img === 'http://host.name/assets/image-hash.png'
  ```

## Default Build Script

```js
{
  "scripts": {"bundle:*": "@carv/snowpack-plugin-rollup"}
}
```

## Plugin Options

None

## Generated Package Contents

| Directory          | Format | Target | Svelte                  | package.json field          | Used by                                    |
| ------------------ | :----: | :----: | ----------------------- | --------------------------- | ------------------------------------------ |
| `node/cjs`         |  cjs   | es2019 | `dev: false, ssr: true` | `main` && `exports.require` | Node.JS for Server Side Rendering          |
| `node/esm`         |  esm   | es2019 | `dev: false, ssr: true` | `exports.default`           | Node.JS for Server Side Rendering          |
| `node/jest`        |  cjs   | es2019 | `dev: true`             | `exports.jest`              | Jest                                       |
| `browser/esnext`   |  esm   | esnext | `dev: false`            | `esnext`                    | Carv CDN and specially configured bundlers |
| `browser/es2015`   |  esm   | es2015 | `dev: false`            | `module`                    | Bundlers like rollup or CDN networks       |
| `browser/snowpack` |  esm   | es2020 | `dev: true`             | `browser:module`            | snowpack.dev                               |
| `types`            |  esm   | esnext | typed                   | `types`                     | Typescript definitions                     |

All assets are put into `assets` directory.

> We are **not** using the [`svelte` package.json field](https://github.com/sveltejs/rollup-plugin-svelte#pkgsvelte).
> This field is used by the `rollup-plugin-svelte` to transpile `*.svelte` files in `node_modules`.
> Furthermore this would require to copy the **whole** `src` directory.
> If any dependency uses a svelte preprocessor each project would need to setup svelte preprocess in the same way.

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