{"id":27364,"library":"rollup-to-nej","title":"rollup-to-nej","description":"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.","status":"maintenance","version":"1.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/WebRookieSyb/rollup-vue-nej","tags":["javascript"],"install":[{"cmd":"npm install rollup-to-nej","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-to-nej","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-to-nej","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Compiles Vue single-file components (.vue) into render functions and styles.","package":"@vue/component-compiler-utils","optional":false},{"reason":"Core bundler used for module bundling.","package":"rollup","optional":false},{"note":"Required only when processing .vue files with templates.","reason":"Compiles Vue templates to render functions.","package":"vue-template-compiler","optional":true}],"imports":[{"note":"Package does not provide ESM exports; use CommonJS require even in Node.js ESM modules.","wrong":"import doRollup from 'rollup-to-nej';","symbol":"default export of rollup-to-nej","correct":"const doRollup = require('rollup-to-nej');"},{"note":"The main export is not a function; access the build method on the exported object.","wrong":"doRollup('vue', { input: 'raw', output: 'src' });","symbol":"doRollup.build","correct":"doRollup.build('vue', { input: 'raw', output: 'src' });"},{"note":"CLI is invoked via the 'roll' binary, not the package name. Use npx roll ... or install globally.","wrong":"rollup-to-nej build vue","symbol":"CLI commands","correct":"roll build vue -i raw -o src"}],"quickstart":{"code":"const doRollup = require('rollup-to-nej');\ndoRollup.build('vue', {\n  input: 'raw',\n  output: 'src',\n  alias: {\n    '@nej': './src',\n    'vueSrc': '../../'\n  },\n  removeComments: true,\n  externalHelpers: false\n});","lang":"javascript","description":"Programmatic build using the API: bundles .vue and .js files from 'raw' to 'src' with NEJ.define wrapping, aliases, and option to remove comments."},"warnings":[{"fix":"Consider migrating to Vite or webpack with NEJ plugins if needed.","message":"Deprecated and unmaintained: no updates since 2020. May not work with modern Rollup or Vue versions (>2.x).","severity":"breaking","affected_versions":">=1.0"},{"fix":"Use 'npx roll build vue ...' or install globally with 'npm i -g rollup-to-nej'.","message":"The CLI binary is named 'roll' (not 'rollup-to-nej' or 'rollup'). Installing globally or using npx requires exact command.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Always quote or escape values that contain special shell characters, e.g., -s \"@nej=./src\".","message":"Alias syntax requires careful quoting: -s @nej=./src (no spaces around =). Using @ inside aliases (e.g., @**) is not recommended.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Manually review and adjust output for target environment.","message":"The generated code includes a 'normalizeComponent' function from vue-component-compiler, which may not be compatible with Vue 3 or NEJ updates.","severity":"deprecated","affected_versions":">=1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install via 'npm install rollup-to-nej' and use 'const doRollup = require('rollup-to-nej');'","cause":"Package not installed or incorrectly required (e.g., using import instead of require).","error":"Error: Cannot find module 'rollup-to-nej'"},{"fix":"Use 'npx roll ...' or install globally: 'npm i -g rollup-to-nej'.","cause":"CLI binary 'roll' not in PATH; package not installed globally or not used via npx.","error":"roll: command not found"},{"fix":"Ensure input files have .vue extension and the 'vue' preset is used: 'roll build vue -i ...'","cause":"Input file is a .vue template but the tool expects JavaScript; missing proper .vue file extension or configuration.","error":"SyntaxError: Unexpected token '<'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}