-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwebpack.config.coffee
37 lines (35 loc) · 1.09 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'
ExtractTextPlugin = require 'extract-text-webpack-plugin'
HtmlWebpackPlugin = require 'html-webpack-plugin'
fontName = 'fonts/[name].[ext]'
module.exports =
entry:
main: [
'webpack-dev-server/client?http://0.0.0.0:8080'
'webpack/hot/dev-server'
'./example/app.coffee'
'./example/app.css'
]
output:
path: './build/'
filename: '[name].js'
publicPath: 'http://localhost:8080/'
resolve:
extensions: [ '.coffee', '.js', '.jsx', '' ]
module:
loaders: [
{ test: /\.json$/, loader: 'json' }
{ test: /\.coffee$/, loader: 'coffee' }
{ test: /\.css$/, loader: ExtractTextPlugin.extract 'style', 'css?importLoaders=1!autoprefixer' }
{ test: /.(eot|svg|ttf|woff(2)?)(\?[a-z0-9=\.]+)?$/, loader: "url?limit=10000&name=#{ fontName }" }
]
plugins: [
new ExtractTextPlugin 'style.css'
new HtmlWebpackPlugin
title: 'React Lite Markdown'
inject: true
minify: collapseWhitespace: true
filename: '../index.html'
template: './example/index.html'
new webpack.NoErrorsPlugin()
]