-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwebpack.config.js
34 lines (33 loc) · 948 Bytes
/
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
var path = require('path'),
testPath = path.join(__dirname, 'test'),
wwwPath = path.join(__dirname, 'www'),
HtmlWebpackPlugin = require('html-webpack-plugin'),
ngAnnotatePlugin = require('ng-annotate-webpack-plugin');
module.exports = {
entry: path.join(testPath, 'test.module.coffee'),
output: {
path: wwwPath,
filename: 'test.js'
},
module: {
loaders: [{
test: /[\/]angular\.js$/,
loader: 'expose?angular!exports?window.angular'
}, {
test: /\.coffee$/,
loader: "coffee"
}]
},
resolve: {
extensions: ['', '.js', '.json', '.scss', '.coffee', '.html']
},
plugins: [new HtmlWebpackPlugin({
filename: 'index.html',
title: 'wp-api-angularjs',
template: path.join(testPath, 'index.html')
}),
new ngAnnotatePlugin({
add: true
})
]
};