Parcel NQP Plugin
raw JSON → 0.43.0 verified Fri May 01 auth: no javascript deprecated
A Parcel bundler plugin for compiling NQP (Not Quite Perl) files during builds. Current version 0.43.0 is stable with no recent updates. It integrates NQP source files into the Parcel asset pipeline, allowing NQP to be used alongside JavaScript. Differentiates from other NQP tools by providing zero-config bundling via Parcel. Release cadence is low; last update was several years ago. Works with Parcel v1 only.
Common errors
error Error: Cannot find module 'parcel-plugin-nqp' ↓
cause Plugin not installed or not in node_modules.
fix
Run 'npm install --save-dev parcel-plugin-nqp'
error Error: NQP is not defined ↓
cause NQP runtime not installed on the system.
fix
Install NQP (e.g., 'brew install rakudo-star' on macOS)
error Error: Plugin is not compatible with this version of Parcel ↓
cause Using Parcel v2 with this plugin.
fix
Downgrade to Parcel v1: 'npm install --save-dev parcel-bundler@1'
Warnings
deprecated Package is deprecated: Parcel v1 is no longer maintained; this plugin is not compatible with Parcel v2. ↓
fix Migrate to Parcel v2 and use an alternative NQP pipeline or a compatible plugin if available.
gotcha Plugin does not support Parcel v2. Installing in a Parcel v2 project will cause build errors. ↓
fix Ensure you are using Parcel v1. Check with 'npm list parcel-bundler'.
gotcha Requires NQP runtime to be installed separately. ↓
fix Install NQP via your system package manager or Rakudo Star.
deprecated No updates since 2019; unmaintained. ↓
fix Consider forking or contacting maintainer if issues arise.
Install
npm install parcel-plugin-nqp yarn add parcel-plugin-nqp pnpm add parcel-plugin-nqp Imports
- default wrong
const parcelPluginNqp = require('parcel-plugin-nqp')correctimport parcelPluginNqp from 'parcel-plugin-nqp' - parcel-plugin-nqp wrong
// package.json { "parcel": { "plugins": ["parcel-plugin-nqp"] } }correct// .parcelrc { "plugins": ["parcel-plugin-nqp"] } - NqpAsset wrong
import NqpAsset from 'parcel-plugin-nqp'correctimport { NqpAsset } from 'parcel-plugin-nqp'
Quickstart
// 1. Install dependencies
npm install --save-dev parcel-bundler@1 parcel-plugin-nqp@0.43.0
// 2. Create .parcelrc
{
"plugins": ["parcel-plugin-nqp"]
}
// 3. Create an NQP file (example.nqp)
// NQP code here
// 4. Build
npx parcel build index.html
// Parcel will process .nqp files automatically