forked from City-of-Helsinki/linkedevents-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.coffee
37 lines (34 loc) · 1.38 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
webpack = require 'webpack'
config = require 'config'
HtmlWebpackPlugin = require 'html-webpack-plugin'
jade = require 'jade'
indexTemplate = jade.compileFile './src/index.jade', pretty: true
indexHtml = indexTemplate
configJson: JSON.stringify config
module.exports =
context: __dirname + '/src'
entry:
app: './app.cjsx'
output:
path: __dirname + '/dist'
filename: '[name].js'
module:
loaders: [
{test: /\.coffee$/, loader: 'coffee-loader'}
{test: /\.cjsx$/, loaders: ['coffee', 'cjsx']}
{test: /\.less$/, loader: 'style!css!less'}
{test: /\.css$/, loader: 'style!css'}
{test: /\.json$/, loader: 'json'}
{test: /\.jade$/, loader: 'jade'}
{test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff"}
{test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff"}
{test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/octet-stream"}
{test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file"}
{test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml"}
]
plugins: [
new HtmlWebpackPlugin
chunks: ['app']
inject: true
templateContent: indexHtml
]