-
Notifications
You must be signed in to change notification settings - Fork 112
/
Copy pathwebpack.config.js
38 lines (37 loc) · 1.1 KB
/
webpack.config.js
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
var path = require('path'),
testPath = path.join(__dirname, 'test'),
wwwPath = path.join(__dirname, 'www'),
docsPath = path.join(__dirname, 'docs'),
pkg = require('./package.json'),
HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: path.join(testPath, 'index.js'),
output: {
path: wwwPath,
filename: 'test.js'
},
module: {
loaders: [{
test: /[\/]angular\.js$/,
loader: 'expose?angular!exports?window.angular'
}, {
test: /\.json$/,
loader: "json"
}, {
test: /\.css$/,
loader: "style!css"
}, {
test: [/ionicons\.svg/, /ionicons\.eot/, /ionicons\.ttf/, /ionicons\.woff/],
loader: 'file?name=fonts/[name].[ext]'
}, {
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: "ng-annotate?add=true!babel"
}]
},
plugins: [new HtmlWebpackPlugin({
filename: 'index.html',
pkg: pkg,
template: path.join(testPath, 'index.html')
})]
};