Mojolic...ollupJs(3)

okay bestie, welcome to the manual page for Mojolic...ollupJs(3) β€” that’s the User Contributed Perl Documentation version of Mojolicious::Plugin::AssetPack::Pipe::RollupJs, and yes the title is doing its little truncation moment. The actual module is the main character here. πŸ’–

🌸 NAME 🌸

Mojolicious::Plugin::AssetPack::Pipe::RollupJs β€” Use Rollup.js module bundler. That’s the whole name-and-one-liner combo, slay.

✨ SYNOPSIS ✨

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

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so 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. It’s giving β€œtiny pieces become one big iconic thing.”

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. Yes, that wording is exactly what the page says, bestie.

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. Not me remembering that detail β€” it’s literally in the page.

modules πŸŽ€

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

List of NPM modules that the JavaScript application depends on. Dependencies, but make it cute.

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. Look at that nested array serving structure, honestly iconic.

πŸ”₯ 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. Simple, useful, no cap.

process πŸ¦‹

See process in Mojolicious::Plugin::AssetPack::Pipe. That’s the whole cross-reference, periodt.

πŸ‘‘ SEE ALSO πŸ‘‘

Mojolicious::Plugin::AssetPack. πŸ’œ


πŸ’– okay that’s the whole page, bestie β€” source/version: perl v5.42.0, dated 2024-12-12, and the footer vibes are Mojolic...ollupJs(3). byeee 🫢

πŸ“¦ where this page comes from