react-toolbox/webpack.config.coffee

40 lines
986 B
CoffeeScript
Raw Normal View History

2015-06-11 06:29:55 +03:00
"use strict"
pkg = require "./package.json"
node_modules = __dirname + '/node_modules'
module.exports =
cache : true
2015-06-12 19:26:51 +03:00
resolve : extensions: ['', '.cjsx', '.coffee', '.js', '.json', '.styl']
2015-06-11 06:29:55 +03:00
context : __dirname + '/spec'
2015-06-12 19:26:51 +03:00
entry : ['./index.cjsx']
2015-06-11 06:29:55 +03:00
output :
path : if process.env.NODE_ENV is 'production' then './dist' else './build'
filename : pkg.name + '.js'
publicPath: '/build/'
devServer:
# contentBase : "./build"
# host : "localhost"
# port : 8000
# colors : true
# progress : true
# noInfo : false
# hot : true
inline : true
module :
2015-06-12 19:26:51 +03:00
noParse : [node_modules + '/react/dist/*.js']
2015-06-11 06:29:55 +03:00
loaders : [
test : /\.cjsx$/, loader: 'coffee-jsx-loader'
,
test : /\.coffee$/, loader: 'coffee-jsx-loader'
,
2015-06-12 19:26:51 +03:00
test : /\.styl$/, loader: 'style-loader!css-loader!stylus-loader?importLoaders=1&minimize!'
2015-06-11 06:29:55 +03:00
]