traceur-brunch

raw JSON →
1.7.5 verified Fri May 01 auth: no javascript maintenance

Brunch plugin that compiles ES6/ES2015 JavaScript using Google's Traceur transpiler. Version 1.7.5 is the latest stable release. The plugin allows configuring which files to process and can pass options like experimental features to Traceur. It is specific to Brunch and depends on the Traceur compiler to transpile ES6 syntax to ES5. Note: This plugin must be listed before other JavaScript processing plugins in package.json. The project appears to be in maintenance mode with no recent updates since 2015.

error Error: Cannot find module 'traceur'
cause Traceur compiler dependency not installed or not found.
fix
Ensure traceur is in your package.json: npm install --save traceur
breaking Plugin requires Brunch versions that support plugins; ensure compatibility with your Brunch version.
fix Use a plugin version that matches your Brunch minor version.
breaking Must be listed before other JavaScript processing plugins in package.json, otherwise Traceur compilation may be skipped.
fix Ensure 'traceur-brunch' appears before 'javascript-brunch' or similar in the dependencies list.
deprecated Traceur itself is deprecated in favor of Babel. This plugin may not receive updates for newer ES features.
fix Consider migrating to babel-brunch for modern ES support.
npm install traceur-brunch
yarn add traceur-brunch
pnpm add traceur-brunch

Install traceur-brunch, add to package.json, configure in brunch config, and build.

// Install the plugin
npm install --save traceur-brunch

// In package.json, ensure traceur-brunch is before other JavaScript plugins
"plugins": ["traceur-brunch", "javascript-brunch"]

// Add configuration in brunch-config.js or config.coffee
module.exports = {
  plugins: {
    traceur: {
      paths: /^app\//,
      options: {
        experimental: true
      }
    }
  }
};

// Then run brunch build