---
name: "Mojolicious::Plugin::AssetPack::Pipe::RollupJs"
section: "3pm"
platform: "linux"
package: "libmojolicious-plugin-assetpack-perl"
version: "2.15-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Mojolicious::Plugin::AssetPack::Pipe::RollupJs"
---

# Mojolicious::Plugin::AssetPack::Pipe::RollupJs(3pm)

Use Rollup.js module bundler

## NAME

Mojolicious::Plugin::AssetPack::Pipe::RollupJs - Use Rollup.js module bundler

## SYNOPSIS

```
  use Mojolicious::Lite;
  plugin AssetPack => {pipes => [qw(RollupJs)]};
```

## DESCRIPTION

Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application.

See \<https://rollupjs.org/\> for more details.

## ATTRIBUTES

### external

```
  $array_ref = $self->external;
  $self = $self->external(["vue"]);
```

Comma-separate list of module IDs to exclude.

### globals

```
  $hash_ref = $self->globals;
  $self = $self->globals({vue => "Vue"});
```

See \<https://rollupjs.org/guide/en#output-globals-g-globals\>.

Any module IDs defined here are added to "external".

### modules

```
  $array_ref = $self->modules;
  $self = $self->modules(["vue"]);
```

List of NPM modules that the JavaScript application depends on.

### plugins

```
  $array_ref = $self->plugins;
  $self = $self->plugins([
            [$module_name, $import_statement, $import_function_args],
            ["rollup-plugin-vue", "VuePlugin"],
            ["rollup-plugin-node-resolve", "resolve", {}],
            ["rollup-plugin-commonjs", "commonjs", {sourceMap => false}],
          ]);
```

List of NPM modules that should be loaded by Rollup.js.

## METHODS

### add\_global

```
  $self = $self->add_global($key => $value);
  $self = $self->add_global(qw(vue Vue));
```

Used to add a key/value pair to "globals".

### process

See "process" in Mojolicious::Plugin::AssetPack::Pipe.

## SEE ALSO

Mojolicious::Plugin::AssetPack.
