literate
false
Loads CoffeeScript like JavaScript
npm install --save-dev coffee-loader
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' ]
}
]
}
}
Name | Default | Description |
---|---|---|
Name Default Description
|
false |
Enable CoffeeScript in Markdown (Code Blocks) e.g
file.coffee.md |
Name Default Description
|
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
Source maps are always produced.
Transpile
webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.coffee$/,
use: [
{
loader: 'coffee-loader',
options: {
transpile: {
presets: ['env']
}
}
}
]
}
]
}
}
Juho Vepsäläinen | Joshua Wiens | Kees Kluskens | Sean Larkin |