Registry / web-framework / rollup-to-nej

rollup-to-nej

JSON →
library1.3.0jsnpmunverified

A build tool that transforms Vue single-file components (.vue) and ES module code into NEJ-style AMD modules with NEJ.define() wrappers. Current version 1.3.0. Provides a command-line interface (roll, rollup) and programmatic API (doRollup). Supports alias mapping to avoid bundling common modules, comment removal, and external Babel helpers. It is a niche tool for projects migrating from Vue/ESM to the NEJ module system, with no active development observed since 2020.

npm install rollup-to-nej
INSTALL
IMPORT
SIG · ROLLUP-TO-NEJ
R
rollup-to-nej
web-frameworkjavascriptv1.3.0
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.

default export of rollup-to-nej
const doRollup = require('rollup-to-nej');
import doRollup from 'rollup-to-nej';
Package does not provide ESM exports; use CommonJS require even in Node.js ESM modules.
doRollup.build
doRollup.build('vue', { input: 'raw', output: 'src' });
doRollup('vue', { input: 'raw', output: 'src' });
The main export is not a function; access the build method on the exported object.
CLI commands
roll build vue -i raw -o src
rollup-to-nej build vue
CLI is invoked via the 'roll' binary, not the package name. Use npx roll ... or install globally.

Programmatic build using the API: bundles .vue and .js files from 'raw' to 'src' with NEJ.define wrapping, aliases, and option to remove comments.

const doRollup = require('rollup-to-nej'); doRollup.build('vue', { input: 'raw', output: 'src', alias: { '@nej': './src', 'vueSrc': '../../' }, removeComments: true, externalHelpers: false });
roll --version
Debug
Known issues
breakingDeprecated and unmaintained: no updates since 2020. May not work with modern Rollup or Vue versions (>2.x).
fix
Consider migrating to Vite or webpack with NEJ plugins if needed.
affects: >=1.0
gotchaThe CLI binary is named 'roll' (not 'rollup-to-nej' or 'rollup'). Installing globally or using npx requires exact command.
fix
Use 'npx roll build vue ...' or install globally with 'npm i -g rollup-to-nej'.
affects: >=1.0
gotchaAlias syntax requires careful quoting: -s @nej=./src (no spaces around =). Using @ inside aliases (e.g., @**) is not recommended.
fix
Always quote or escape values that contain special shell characters, e.g., -s "@nej=./src".
affects: >=1.0
deprecatedThe generated code includes a 'normalizeComponent' function from vue-component-compiler, which may not be compatible with Vue 3 or NEJ updates.
fix
Manually review and adjust output for target environment.
affects: >=1.0
Errors
Common errors & fixes
Error: Cannot find module 'rollup-to-nej'
Package not installed or incorrectly required (e.g., using import instead of require).
fix
Install via 'npm install rollup-to-nej' and use 'const doRollup = require('rollup-to-nej');'
roll: command not found
CLI binary 'roll' not in PATH; package not installed globally or not used via npx.
fix
Use 'npx roll ...' or install globally: 'npm i -g rollup-to-nej'.
SyntaxError: Unexpected token '<'
Input file is a .vue template but the tool expects JavaScript; missing proper .vue file extension or configuration.
fix
Ensure input files have .vue extension and the 'vue' preset is used: 'roll build vue -i ...'
Upgrade
Version history
1.3.0latest on npm
Audit
Dependencies
@vue/component-compiler-utilsrequiredCompiles Vue single-file components (.vue) into render functions and styles.
rolluprequiredCore bundler used for module bundling.
vue-template-compileroptionalCompiles Vue templates to render functions.
Agent activity
4 hits · last 30 days
node
4
Resources
rollup-to-nej — npm install rollup-to-nej · libregistry