Package Exports
- cjsx-loader
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cjsx-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
coffee-react-transform loader module for Webpack.
Install
npm install cjsx-loader
Usage
Here's a simple webpack.config.js file that you could use. For a more
sophisticated/complete example, see my coffee-react-quickstart
project.
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
"webpack-dev-server/client?http://0.0.0.0:8080",
'./src/scripts/router'
],
devtool: "eval",
output: {
path: path.join(__dirname, "public"),
filename: 'bundle.js'
},
resolveLoader: {
modulesDirectories: ['node_modules']
},
resolve: {
extensions: ['', '.js', '.cjsx', '.coffee']
},
module: {
loaders: [
{ test: /\.cjsx$/, loaders: ['coffee', 'cjsx']},
{ test: /\.coffee$/, loader: 'coffee' }
]
}
};