-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.coffee
74 lines (67 loc) · 1.81 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
path = require 'path'
webpack = require 'webpack'
bowerComponentsPath = path.join(__dirname, '/src/vendor/bower_components')
module.exports =
contentBase: "#{__dirname}/src/"
cache: true
entry:
moduleBundle: './src/scripts/moduleBundle'
output:
path: path.join(__dirname, 'dist/scripts')
publicPath: 'dist/scripts'
filename: '[name].js'
chunkFilename: '[chunkhash].js'
resolve:
extensions: ['', '.webpack.js', '.web.js', '.coffee', '.js', '.css', '.scss', '.sass', '.jsx', '.cjsx']
modulesDirectories: ['./src/scripts', 'web_modules', bowerComponentsPath, 'node_modules', './src/styles']
module:
loaders: [
{
test: /\.js(x?)$/
loader: 'jsx-loader?harmony'
}
{
test: /\.cjs(x?)$/
loaders: [
'coffee-loader',
'cjsx-loader'
]
}
{
test: /\.coffee$/
loader: 'coffee-loader'
}
# {
# test: /\.scss$/
# loader: "style-loader!sass-loader?outputStyle=expanded&includePaths[]=./bower_components/bootstrap-sass/assets/stylesheets"
# }
# {
# test: /\.sass$/
# loader: "style-loader!sass-loader"
# }
{
test: /\.css$/
loader: 'style-loader!css-loader'
}
{
test: /\.{scss|sass}$/
# Passing indentedSyntax query param to node-sass
loader: "?outputStyle=expanded&indentedSyntax=sass"
}
{
test: /\.(png|woff|woff2|eot|ttf|svg)$/
loader: 'url-loader?limit=100000'
}
]
noparse: [
"#{bowerComponentsPath}"
"node_modules"
]
plugins: [
new webpack.HotModuleReplacementPlugin()
->
@plugin 'done', (stats) ->
stats = stats.toJson()
console.error JSON.stringify
assetsByChunkName: stats.assetsByChunkName
]