coffee-jsxy-loader
v0.1.1
Published
coffee-jsxy loader module for webpack
Downloads
3
Readme
npm install --save-dev coffee-jsxy-loader
import coffee from 'coffee-jsxy-loader!./file.coffee';
Configuration (recommended)
import coffee from 'file.coffee';
webpack.config.js
Since CoffeeScript-JSXY outputs ES6, you probably want to pass its output
to babel-loader
module.exports = {
module: {
rules: [
{
test: /\.coffee$/,
use: [ 'babel-loader', 'coffee-jsxy-loader' ]
}
]
}
}
|Name|Default|Description|
|:--:|:-----:|:----------|
|literate
|false
|Enable CoffeeScript in Markdown (Code Blocks) e.g file.coffee.md
|
|sourceMap
|false
|Enable/Disable Sourcemaps|
Literate
webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.coffee.md$/,
use: [
{
loader: 'coffee-jsxy-loader',
options: { literate: true }
}
]
}
]
}
}
Sourcemaps
webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.coffee$/,
use: [
{
loader: 'coffee-jsxy-loader',
options: { sourceMap: true }
}
]
}
]
}
}