ag-grid is proud to partner with webpack

coffee-loader

Loads CoffeeScript like JavaScript

Install

npm install --save-dev coffee-loader

Usage

import coffee from 'coffee-loader!./file.coffee';

##

import coffee from 'file.coffee';

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.coffee$/,
        use: [ 'coffee-loader' ]
      }
    ]
  }
}

Options

Name
Default
Description
Name
literate
Default
false
Description
Enable CoffeeScript in Markdown (Code Blocks) e.g file.coffee.md
Name
transpile
Default
false
Description
Provide Babel presets and plugins

Literate

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.coffee.md$/,
        use: [
          {
            loader: 'coffee-loader',
            options: { literate: true }
          }
        ]
      }
    ]
  }
}

Sourcemaps

Source maps are always produced.

Transpile

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.coffee$/,
        use: [
          {
            loader: 'coffee-loader',
            options: { 
              transpile: {
                presets: ['env']
              }
            }
          }
        ]
      }
    ]
  }
}

Maintainer


Juho Vepsäläinen


Joshua Wiens


Kees Kluskens


Sean Larkin