JSPM

@solid-integrations/rollup

0.0.300
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q22779F
  • License MIT

An integration for rollup

Package Exports

  • @solid-integrations/rollup

Readme

Solid Primitives rollup

@solid-integrations/rollup

turborepo size version stage

A sample primitive that is made up for templating with the following options:

  • createCompiled - Returns a resource containing the rollup output after bundling the given code.
  • createCompiledCode - Composes createCompiled - instead returning an accessor containing the bundled code.

Installation

npm install @solid-integrations/rollup
# or
yarn add @solid-integrations/rollup
# or
pnpm add @solid-integrations/rollup

How to use it

createCompiled

const [files, setFiles] = createSignal({
  "main.js": "import {coolFun} from './coolFile.js'; coolFun()",
  "coolFile.js": "export function coolFun(){console.log('Hello World')}",
});
const [compiled] = createCompiled(files);
console.log(compiled()); // Displays rollup's output from bundling the code.
// This includes extra metadata, rather than just the file itself

createCompiledCode

const [files, setFiles] = createSignal({
  "main.js": "import {coolFun} from './coolFile.js'; coolFun()",
  "coolFile.js": "export function coolFun(){console.log('Hello World')}",
});
const compiled = createCompiledCode(files);
console.log(compiled()); // Displays the bundled code generated by rollup

Changelog

See CHANGELOG.md