forked from jianliaoim/volubile-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.coffee
44 lines (36 loc) · 1.45 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
fs = require 'fs'
webpack = require 'webpack'
fontName = 'fonts/[name].[ext]'
module.exports =
entry:
vendor: [
'webpack-dev-server/client?http://0.0.0.0:8080'
'webpack/hot/dev-server'
]
main: './src/main'
output:
path: 'build/'
filename: '[name].js'
publicPath: 'http://localhost:8080/build/'
resolve:
extensions: ['.js', '.coffee', '.less', '']
module:
loaders: [
{ test: /\.coffee/, loader: 'coffee', ignore: /node_modules/ }
{ test: /\.less/, loader: 'style!css!less' }
{test: /\.woff((\?|\#)[\?\#\w\d_-]+)?$/, loader: "url", query: {limit: 100, minetype: 'application/font-woff', name: fontName}}
{test: /\.woff2((\?|\#)[\?\#\w\d_-]+)?$/, loader: "url", query: {limit: 100, minetype: 'application/font-woff2', name: fontName}}
{test: /\.ttf((\?|\#)[\?\#\w\d_-]+)?$/, loader: "url", query: {limit: 100, minetype: "application/octet-stream", name: fontName}}
{test: /\.eot((\?|\#)[\?\#\w\d_-]+)?$/, loader: "url", query: {limit: 100, name: fontName}}
{test: /\.svg((\?|\#)[\?\#\w\d_-]+)?$/, loader: "url", query: {limit: 10000, minetype: "image/svg+xml", name: fontName}}
{test: /\.png$/, loader: 'url', query: {limit: 1000, minetype: 'image/png'}}
{ test: /\.md$/, loader: 'raw!remarkable'}
]
plugins: [
new webpack.optimize.CommonsChunkPlugin 'vendor', 'vendor.js'
]
remarkable:
preset: 'full'
linkify: true
typographer: true
breaks: true