Registry / http-networking / mozu-require-compiler

mozu-require-compiler

JSON →
library3.0.2jsnpmunverified

A customized version of the RequireJS optimizer (r.js) tailored for Mozu applications. This package provides a command-line tool for building AMD modules using the RequireJS module system. Version 3.0.2 is the latest release, but it is based on an older r.js codebase. It supports Node.js, Rhino/Java, and xpcshell environments. The primary use case is optimizing and combining AMD modules for browser delivery. Compared to the official requirejs package, this fork may include Mozu-specific patches or configuration defaults. However, it is largely unmaintained and users are advised to use the official `requirejs` package instead.

npm install mozu-require-compiler
INSTALL
IMPORT
SIG · MOZU-REQUIRE-COMPI
M
mozu-require-compiler
http-networkingjavascriptv3.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

requirejs
import requirejs from 'requirejs';
const r = require('mozu-require-compiler');
Use official requirejs package; mozu-require-compiler is a fork.
r.js CLI
r.js -o buildconfig.js
mozu-require-compiler -o buildconfig.js
CLI tool is called `r.js` not `mozu-require-compiler`. Install official requirejs globally.
define/require
define(['dep'], function(dep) { ... })
const dep = require('dep')
AMD-style define/require, not CommonJS. This is standard AMD.

Install the official requirejs package, create a build configuration for your AMD project, and run the optimizer.

// Install official requirejs npm install -g requirejs // Build project using a build config r.js -o buildconfig.js // Example buildconfig.js ({ appDir: './src', baseUrl: '.', dir: './dist', modules: [ { name: 'main' } ], paths: { jquery: 'empty:' } })
r.js --version
Debug
Known issues
deprecatedmozu-require-compiler is a deprecated fork of r.js. Use the official requirejs package instead.
fix
npm uninstall -g mozu-require-compiler && npm install -g requirejs
affects: >=0.0.0
breakingThe package may lack updates for modern Node.js versions and may break > Node 10.
fix
Use requirejs package or update to a maintained AMD bundler.
affects: >=3.0.0
gotchaThe CLI command is `r.js` not `mozu-require-compiler` after installation.
fix
Run `r.js -v` instead of `mozu-require-compiler`.
affects: >=0.0.0
gotchaThe package may include Mozu-specific default configurations that differ from standard requirejs behavior.
fix
Review the default build config; override in your project's config file.
affects: >=0.0.0
deprecatedThe last release (3.0.2) was published years ago; there is no active maintenance.
fix
Migrate to requirejs or a modern bundler like webpack or Rollup.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'mozu-require-compiler'
Package not installed globally or locally.
fix
npm install -g mozu-require-compiler (deprecated) or use requirejs instead.
TypeError: require(...) is not a function
Using CommonJS require on AMD-only code.
fix
Use define/require in AMD style, or convert to CommonJS if using Node.
r.js: command not found
Official r.js not installed; mozu-require-compiler installs as 'r.js' but may not be in PATH.
fix
Ensure mozu-require-compiler is installed globally with -g flag.
Error: Build config not found: /path/to/buildconfig.js
Incorrect path or missing file.
fix
Provide absolute path or ensure file exists relative to working directory.
Upgrade
Version history
3.0.2latest on npm
Audit
Dependencies
requirejsrequiredThis is a fork; use the official requirejs package for active development.
Agent activity
2 hits · last 30 days
node
2
Resources
mozu-require-compiler — npm install mozu-require-compiler · libregistry