-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebpack.example.config.js
More file actions
45 lines (43 loc) · 1.13 KB
/
webpack.example.config.js
File metadata and controls
45 lines (43 loc) · 1.13 KB
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
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
devtool: 'source-map',
entry: './examples/ui.js',
output: {
filename: 'examples.js',
publicPath: '',
path: path.resolve(__dirname),
libraryTarget: 'umd'
},
module: {
loaders: [
{test: /\.js$/, exclude: [/node_modules/], loader: 'ng-annotate!babel'},
{test: /\.html$/, exclude: /formtpl\.html$/, loader: 'raw'},
{test: /formtpl\.html$/, loader: 'raw!ng-include-loader'},
{test: /\.less$/, loader: 'style!css!less'},
{test: /\.css$/, loader: 'style!css'},
{
test : /\.(ttf|eot|svg|woff(2)?)(\?\S*)?$/,
loader : require.resolve('file-loader')
},
// IMAGE
{
test: /.(gif|jpg|png)$/,
loader: 'file?name=img-[hash].[ext]'
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: './examples/index.html',
inject: 'body',
minify: false
}),
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
}),
new webpack.optimize.UglifyJsPlugin()
]
};