gobble-es6-modules

raw JSON →
0.1.0 verified Fri May 01 auth: no javascript deprecated

A gobble plugin that transpiles ES6 modules to ES5 using the es6-module-transpiler (esnext). Version 0.1.0 is the latest stable release. This package is part of the gobble build system ecosystem and provides a simple .map('es6-modules') transform. It supports both bundle mode (single file output from an entry point) and AMD mode (one-to-one file mapping). The package is minimal but relies on the now-deprecated es6-module-transpiler and has not seen updates since 2014.

error Error: Cannot find module 'es6-module-transpiler'
cause Missing peer dependency es6-module-transpiler.
fix
Run 'npm install es6-module-transpiler' as a dependency.
error TypeError: gobble(...).map is not a function
cause gobble is not installed or the gobblefile is incorrectly structured.
fix
Ensure gobble is installed (npm install gobble) and the gobblefile exports the result of gobble().map() correctly.
deprecated es6-module-transpiler (esnext) is deprecated and unmaintained. Use Babel or TypeScript instead.
fix Migrate to gobble-babel or another modern transpiler plugin.
gotcha The plugin only supports AMD output for individual files; other module formats (CommonJS, UMD) are not available.
fix Use bundle mode to get single file output, or combine with other plugins.
gotcha Version 0.1.0 is the latest and only version; no updates since 2014.
fix Consider using an actively maintained alternative.
npm install gobble-es6-modules
yarn add gobble-es6-modules
pnpm add gobble-es6-modules

Shows how to use gobble-es6-modules to transpile ES6 modules into a single bundled ES5 file.

var gobble = require('gobble');

// Create a bundle from entry point 'app.js'
module.exports = gobble('js').map('es6-modules', { bundle: 'app.js' });