A browser-based trans-bundler that runs entirely in the browser, enabling code transformation and bundling without a server. Current version 0.1.9. It leverages existing bundler concepts for client-side use, focusing on ease of integration and in-browser workflows. Differentiates from server-side bundlers by operating fully in the browser environment, making it suitable for online editors or prototyping tools.
npm install packagerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to bundle a simple ES module string with a custom resolver, outputting the transformed code.
Always provide a 'resolve' function that returns an object with a 'code' property for each imported module.
Use 'await' or '.then()' when calling 'bundle'.
Replace 'import { transform } from 'packager'' with 'import { bundle } from 'packager'' and adjust usage.Ensure your resolve function returns an object with 'code' (string) and optionally 'map' (object). For now, 'code' is sufficient but prepare to add 'map' eventually.
Use 'import packager from 'packager'' or 'import { bundle } from 'packager'' in an ESM context.Make sure 'resolve' returns an object with a 'code' property containing the module's source code as a string.
Run 'npm install packager' (or yarn/pnpm equivalent).
No dependency data recorded yet.