Registry / web-framework / arenaless-bundler

arenaless-bundler

JSON →
library1.1.7jsnpmunverified

arenaless-bundler is a JavaScript/TypeScript bundler built upon Rollup, specifically designed for the ArenaLess ecosystem. Currently at version 1.1.7, its release cadence appears irregular, driven by project needs rather than a fixed schedule. A key differentiator is its support for a virtual file system, allowing builds to run in environments without direct file access, such as web browsers. It features Deno-like network imports, supporting `npm:`, `jsr:`, `http:`, and `https:` schemes (with `npm:` and `jsr:` resolving via `esm.sh`). The bundler also provides unique asset loading capabilities for local modules via special import suffixes like `?text`, `?base64`, `?binary`, and `?wasm`, alongside default JSON file importing. This focus on virtualized environments and flexible asset handling makes it suitable for specific web-based build pipelines or specialized module bundling needs.

npm install arenaless-bundler
INSTALL
IMPORT
SIG · ARENALESS-BUNDLER
A
arenaless-bundler
web-frameworkjavascriptv1.1.7
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

build
import { build } from 'arenaless-bundler';
const { build } = require('arenaless-bundler');
The library is primarily designed for ESM consumption, as demonstrated in its documentation and examples.

This quickstart demonstrates how to use `arenaless-bundler` to bundle a small virtual file system project, including local modules, special suffix imports, and network imports, outputting a CommonJS bundle.

import { build } from "arenaless-bundler"; import * as fs from "fs"; async function testBundler() { let files_text: Record<string, string> = { "index.ts": `import { hello } from './hello/hi'; import hellots from './hello/hi.ts?text'; import hellob64 from './hello/hi.ts?base64'; hello(); console.log(hellots); console.log(hellob64); import JSON5 from 'npm:json5'; console.log(JSON5.parse('{a:1}')); import foo from './foo.json'; console.log(foo);`, "hello/hi.ts": `export function hello(): void { console.log("hello from hi.ts"); }`, "foo.json": `{"bar":12345}` }; let files: Record<string, Uint8Array> = {}; for (let key in files_text) { files[key] = new TextEncoder().encode(files_text[key]); } console.log("Starting bundle process..."); // The last three parameters are 'config_json_str', 'logger', 'output_format', 'esbuild_config_json_str', 'is_prod' let res = await build(files, "index.ts", "{}", console, "cjs", "{}", false); const outputPath = "./test_output.js"; fs.writeFileSync(outputPath, res, { encoding: "utf-8" }); console.log(`Bundle complete. Output written to ${outputPath}`); return res; } (async () => { const start = Date.now(); await testBundler(); console.log(`Bundling took ${Date.now() - start}ms`); })();
Debug
Known issues
gotchaSpecial import suffixes like `?binary`, `?text`, `?base64`, and `?wasm` are explicitly designed to work only with local modules provided within the bundler's virtual file system. They are not supported for modules imported via network schemes (`npm:`, `jsr:`, `http:`, `https:`).
fix
Ensure that special suffixes are only applied to paths referencing files within the `Record<string, Uint8Array>` input to the `build` function. Network-imported modules must be consumed without these suffixes.
affects: >=1.0.0
gotchaThe `npm:` and `jsr:` network import schemes internally resolve modules via `https://esm.sh/`. This introduces an external dependency for module resolution that may affect build reliability, performance, or introduce unexpected versioning behavior if `esm.sh` experiences issues or changes its policies.
fix
Be aware of the reliance on `esm.sh` for `npm:` and `jsr:` imports. For critical dependencies, consider vendoring them into your virtual file system or using direct `https:` imports if a specific CDN URL is preferred and stable.
affects: >=1.0.0
gotchaAll input files for the `build` function must be provided as `Uint8Array` within the `files` object representing the virtual file system. Text-based files (like `.ts`, `.js`, `.json`) require explicit manual encoding using `new TextEncoder().encode(fileContent)` before being passed to the bundler.
fix
Always convert string content to `Uint8Array` using `new TextEncoder().encode()` for text files, and ensure binary files are also provided as `Uint8Array`.
affects: >=1.0.0
Errors
Common errors & fixes
Module not found: Could not resolve 'path/to/module'
The module path specified in an import statement (e.g., `./some-file.ts`) does not correspond to a key in the `files` object provided to the `build` function, or the path is misspelled.
fix
Verify that all imported modules are present as keys in the `files` object passed to `build`, and that the paths in `import` statements exactly match the keys in the virtual file system.
SyntaxError: Cannot use import statement outside a module
This error typically occurs when attempting to execute the bundled output (e.g., `test_output.js`) directly in a Node.js environment configured for CommonJS, but the bundled output uses ES module syntax (e.g., `import`/`export`).
fix
Ensure the `output_format` parameter in the `build` function call (e.g., set to `'cjs'` for CommonJS or `'esm'` for ES modules) matches the target environment's expectations. If bundling to CJS, ensure `package.json` doesn't force ESM; if to ESM, ensure `package.json` has `"type": "module"` or files end in `.mjs`.
Error: Special suffix '?text' is not supported for network imports.
Attempting to use a special import suffix (`?text`, `?binary`, `?base64`, `?wasm`) on a module imported via a network scheme (e.g., `npm:json5?text`).
fix
These special suffixes are strictly for local modules within the virtual file system. Network imports must be consumed directly without any suffixes.
Upgrade
Version history
1.1.7latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
arenaless-bundler — npm install arenaless-bundler · libregistry