coffee-loader
coffee loader module for webpack
Last updated 2 years ago by d3viant0ne .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install coffee-loader 
SYNC missed versions from official npm registry.

npm node deps tests coverage chat

Coffee Loader

Loads CoffeeScript like JavaScript

Install

npm install --save-dev coffee-loader

Usage

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

Configuration (recommended)

import coffee from 'file.coffee';

webpack.config.js

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

Options

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

Literate

webpack.config.js

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

Sourcemaps

webpack.config.js

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

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

Current Tags

  • 0.9.0                                ...           latest (2 years ago)

19 Versions

  • 0.9.0                                ...           2 years ago
  • 0.8.0                                ...           2 years ago
  • 0.7.3                                ...           3 years ago
  • 0.7.2                                ...           5 years ago
  • 0.7.1                                ...           6 years ago
  • 0.7.0                                ...           6 years ago
  • 0.6.1                                ...           6 years ago
  • 0.6.0                                ...           7 years ago
  • 0.5.0                                ...           7 years ago
  • 0.2.0                                ...           7 years ago
  • 0.1.8                                ...           7 years ago
  • 0.1.7                                ...           7 years ago
  • 0.1.6                                ...           7 years ago
  • 0.1.5                                ...           8 years ago
  • 0.1.4                                ...           8 years ago
  • 0.1.3                                ...           8 years ago
  • 0.1.2                                ...           8 years ago
  • 0.1.1                                ...           8 years ago
  • 0.1.0                                ...           8 years ago
Downloads
Today 6
This Week 6
This Month 692
Last Day 5
Last Week 308
Last Month 675
Dependencies (1)
Dev Dependencies (1)
Dependents (169)

Copyright 2014 - 2016 © taobao.org |