broccoli-es6-concatenator

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

Deprecated Broccoli plugin to transpile ES6 modules (using es6-module-transpiler) and concatenate them into a single file, recursively resolving import statements. Current version 0.1.11. This package is abandoned and should not be used for new projects; it relies on an old, incorrect version of es6-module-transpiler that does not follow ES6 module semantics. Users should migrate to modern bundlers like Webpack, Rollup, or broccoli-rollup.

error Error: Cannot find module 'es6-module-transpiler'
cause Missing dependency es6-module-transpiler in node_modules.
fix
Run npm install --save-dev es6-module-transpiler@~0.6.0 or ensure it's in package.json.
error TypeError: compileES6 is not a function
cause Incorrect import; e.g., using destructuring { compileES6 }.
fix
Use const compileES6 = require('broccoli-es6-concatenator');
error Error: Cannot find module 'broccoli'
cause Broccoli is not installed or not in node_modules.
fix
Run npm install --save-dev broccoli
deprecated This plugin is deprecated and uses an old version of es6-module-transpiler that does not correctly reflect ES6 module semantics.
fix Migrate to a modern bundler like Webpack, Rollup, or broccoli-rollup.
npm install broccoli-es6-concatenator
yarn add broccoli-es6-concatenator
pnpm add broccoli-es6-concatenator

Shows how to require and use broccoli-es6-concatenator with common options like inputFiles, loaderFile, and wrapInEval.

const compileES6 = require('broccoli-es6-concatenator');
const sourceTree = 'app'; // your source directory
const applicationJs = compileES6(sourceTree, {
  loaderFile: 'loader.js',
  ignoredModules: ['resolver'],
  inputFiles: ['todomvc/**/*.js'],
  legacyFilesToAppend: ['jquery.js', 'handlebars.js', 'ember.js'],
  wrapInEval: true,
  outputFile: '/assets/application.js'
});
module.exports = applicationJs;