Traceur loader for Webpack
JavaScript
Switch branches/tags
Nothing to show
Clone or download
1
Latest commit 1a15f06 Dec 19, 2014
Permalink
Failed to load latest commit information.
.gitignore Use gitignore.io Dec 2, 2014
LICENSE Initial commit Jul 27, 2014
README.md Update result code for no source maps Dec 1, 2014
index.js Update result code for no source maps Dec 1, 2014
package.json Update Traceur Dec 19, 2014

README.md

traceur-loader 0.6.3

Traceur 0.0.72 loader for Webpack.

Usage

// Simple option (does not include Traceur runtime)
require("traceur!./script-file");

// Include Traceur runtime automatically
require("traceur?runtime!./script-file");

// Specify Traceur options
require("traceur?experimental&symbols!./script-file");

// All together now
require("traceur?runtime&symbols!./script-file");

Recommended configuration (do not process modules)

{
  module: {
    loaders: [
      {
        test: /^(?!.*(bower_components|node_modules))+.+\.js$/,
        loader: 'traceur'
      }
    ]
  }
}

// With parameters
{
  module: {
    loaders: [
      {
        test: /^(?!.*(bower_components|node_modules))+.+\.js$/,
        loader: 'traceur?experimental&runtime'
      }
    ]
  }
}

Defaults

{
  // Modules set to CommonJS (consistent with Node.js and Webpack)
  modules: 'commonjs',

  // Source maps are built and fed to Webpack (use Webpack options)
  sourceMaps: true,

  // Traceur runtime by default not auto included
  runtime: false
}

Runtime path

Access to the runtime path is available as a direct reference: require('traceur-loader').runtime.

To view all Traceur options, visit here.