-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.coffee
53 lines (49 loc) · 1.16 KB
/
webpack.config.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
webpack = require 'webpack'
path = require 'path'
stylus = require 'stylus'
nib = require 'nib'
banner = 'Copyright 2015 Thomas Yang http://thomas-yang.me/'
paths =
src: path.join(__dirname, 'src')
dest: path.join(__dirname, 'dist')
module.exports =
entry: [
'webpack/hot/dev-server',
'webpack-dev-server/client?http://localhost:5000',
paths.src + '/coffee/main.coffee'
]
watch: true
debug: true
devtool: 'eval'
output:
path: paths.dest
filename: 'main.js'
resolve:
# you can now require('file') instead of require('file.coffee')
extensions: ['', '.js', '.json', '.coffee', '.css', '.styl']
module:
loaders: [
{
test: /\.coffee$/
exclude: /node_modules/
loader: 'coffee-loader'
},
{
test: /\.styl$/
loader: 'style-loader!css-loader!stylus-loader?resolve url'
},
{
test: /\.(eot|ttf|woff)$/
loader: 'url?limit=100000'
}
],
stylus:
use: [nib()]
define:
url: stylus.url
paths: [__dirname + '/src']
limit: false
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.BannerPlugin(banner)
]