rollup-plugin-nodent

raw JSON →
0.2.2 verified Mon Apr 27 auth: no javascript maintenance

Rollup plugin that transpiles ES2017 async/await keywords using nodent, a non-ES6 transformer. Version 0.2.2 is the latest release, with no recent updates. It supports Node >=4 and Rollup. Unlike Babel or TypeScript conversions, nodent avoids generator-based polyfills, producing faster code, but lacks active maintenance and may have compatibility issues with modern Rollup versions.

error Error: Cannot find module 'rollup-plugin-nodent'
cause Package not installed or incorrectly referenced.
fix
Run 'npm install --save-dev rollup-plugin-nodent'.
error TypeError: nodent is not a function
cause Using a named import instead of default import.
fix
Use 'import nodent from 'rollup-plugin-nodent'' or 'const nodent = require('rollup-plugin-nodent').default'.
gotcha Plugin does not support Promises; requires Promise polyfill for older environments.
fix Use a Promise polyfill like es6-promise before bundling.
deprecated nodent is deprecated in favor of Babel or TypeScript for async/await.
fix Consider migrating to @rollup/plugin-babel with @babel/preset-env.
gotcha Not compatible with Rollup v2+ plugin API without adjustments.
fix Use rollup-plugin-nodent@1.0.0 or later for Rollup v2 support, or stick with Rollup v1.
npm install rollup-plugin-nodent
yarn add rollup-plugin-nodent
pnpm add rollup-plugin-nodent

Configures Rollup to transpile async/await with nodent plugin.

// rollup.config.js
import nodent from 'rollup-plugin-nodent';

export default {
  input: 'src/main.js',
  output: {
    file: 'bundle.js',
    format: 'iife'
  },
  plugins: [nodent()]
};