coffee loader module for webpack
Branch: master
Clone or download
Pull request Compare This branch is 5 commits ahead, 21 commits behind webpack-contrib:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
index.js
package.json

README.md

coffee-script loader for webpack

Usage

var exportsOfFile = require("coffee!./file.coffee");
// => return exports of executed and compiled file.coffee

var exportsOfFile2 = require("coffee?literate!./file.litcoffee");
// can also compile literate files.

Documentation: Using loaders

Recommended configuration

{
	module: {
		loaders: [
			{ test: /\.coffee$/, loader: "coffee-loader" },
			{ test: /\.(coffee\.md|litcoffee)$/, loader: "coffee-loader?literate" }
		]
	}
}

Caching

An option to save the result of the compilation to disk exists.

    module: {
        loaders: [
            {
                test: /\.coffee$/,
                loader: 'coffee',
                query: {
                    cacheDirectory: '.coffee-cache'
                }
            }
        ]
    }

License

MIT (http://www.opensource.org/licenses/mit-license.php)