AppBot Compiler

raw JSON →
0.0.19 verified Fri May 01 auth: no javascript deprecated

Experimental CommonJS module compiler for target-specific modular design, enabling device-tailored app versions from a shared codebase. Current version 0.0.19 (unstable, low release cadence). Dynamically compiles CommonJS modules based on screen width or device type, serving conditional bundles (e.g., mobile vs web). A proof-of-concept for server-side module compilation with query parameter routing, not production-ready. Differentiators: runtime module assembly per device, mirror module names across targets. Risks: no active maintenance, no security audits, single author.

error Cannot find module 'appbot-compiler'
cause Package not installed or not in node_modules.
fix
Run npm install appbot-compiler --save-dev.
error compile is not a function
cause Import style mismatch (tried default import instead of named).
fix
Use const { compile } = require('appbot-compiler');.
breaking Package is experimental and may have breaking changes between minor versions.
fix Pin to exact version; no SemVer guarantees.
deprecated No updates since 2014; considered abandoned.
fix Migrate to a maintained modular compilation solution.
gotcha Compiler only works with synchronous require-based CommonJS modules.
fix Ensure all modules use synchronous require; no dynamic imports.
npm install appbot-compiler
yarn add appbot-compiler
pnpm add appbot-compiler

Shows how to compile a CommonJS app for mobile target with width query parameter.

const { compile } = require('appbot-compiler');
const result = compile({
  dir: './app',
  target: 'mobile',
  width: 320
});
console.log(result.bundle);