-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.coffee
64 lines (60 loc) · 1.61 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
HtmlWebpackPlugin = require 'html-webpack-plugin'
webpack = require 'webpack'
glob = require("glob")
TEMPLATE = """
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="UTF-8">
<title>Servicemap embedding preview</title>
</head>
<body>
</body>
</html>
"""
module.exports =
context: __dirname + '/src'
entry:
app: './app/main.coffee'
test: glob.sync(__dirname + "/test/*.coffee")
output:
path: __dirname + '/dist'
filename: '[name].js'
publicPath: '/embedder/'
resolve:
root: [
__dirname + '/styles',
__dirname + '/src/',
__dirname + '/node_modules',
__dirname + '/vendor/styles']
extensions: [
"",
".css",
".webpack.coffee",
".web.js",
".js",
".coffee",
".cjsx"
]
module:
devtool: 'source-map',
loaders: [
{ test: /\.json$/, loader: 'json' },
{ test: /\.coffee$/, loader: 'coffee-loader' },
{ test: /\.cjsx$/, loaders: ['coffee', 'cjsx'] },
{ test: /\.css$/, loader: "style-loader!css-loader" },
{ test: /\.less$/, loader: "style!css!less" },
{ test: /\.woff$/, loader: "file-loader" },
{ test: /\.woff2$/, loader: "file-loader" },
{ test: /\.ttf$/, loader: "file-loader" },
{ test: /\.eot$/, loader: "file-loader" },
{ test: /\.svg$/, loader: "file-loader" }
]
plugins: [
new HtmlWebpackPlugin
chunks: ['app']
title: 'Servicemap embedding preview'
inject: true
templateContent: TEMPLATE
]