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.
Common errors
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');. Warnings
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.
Install
npm install appbot-compiler yarn add appbot-compiler pnpm add appbot-compiler Imports
- Compiler wrong
const Compiler = require('appbot-compiler')correctimport { Compiler } from 'appbot-compiler' - compile wrong
import compile from 'appbot-compiler'correctimport { compile } from 'appbot-compiler' - require wrong
import * as appbot from 'appbot-compiler'correctconst appbot = require('appbot-compiler')
Quickstart
const { compile } = require('appbot-compiler');
const result = compile({
dir: './app',
target: 'mobile',
width: 320
});
console.log(result.bundle);