paper-enroll
raw JSON → 0.0.1 verified Sat Apr 25 auth: no javascript
paper-enroll is a bundler for h5-projects, currently at version 0.0.1. It is an early-stage tool with no stable release cadence. Its key differentiator is focus on H5 project bundling, but lacks documentation and community adoption. Compared to mature bundlers (Webpack, Vite), it is experimental.
Common errors
error TypeError: paper_enroll_1.bundle is not a function ↓
cause Misusing default import instead of named import.
fix
Use
import { bundle } from 'paper-enroll' instead of import bundle from 'paper-enroll'. error Cannot find module 'paper-enroll' ↓
cause Package not installed or not in node_modules.
fix
Run
npm install paper-enroll or yarn add paper-enroll. Warnings
breaking API surface may change drastically before v1.0.0; no stability guarantees. ↓
fix Pin to exact version and test upgrades carefully.
deprecated The `createProject` function is experimental and may be removed in future releases. ↓
fix Use `bundle` directly and manually scaffold project.
Install
npm install paper-enroll yarn add paper-enroll pnpm add paper-enroll Imports
- bundle wrong
const bundle = require('paper-enroll')correctimport { bundle } from 'paper-enroll' - createProject wrong
import createProject from 'paper-enroll'correctimport { createProject } from 'paper-enroll' - type Config
import type { Config } from 'paper-enroll'
Quickstart
import { bundle } from 'paper-enroll';
async function main() {
const result = await bundle({
entry: './src/index.html',
output: './dist',
minify: true,
});
console.log('Bundled successfully:', result.files);
}
main().catch(console.error);