-
Notifications
You must be signed in to change notification settings - Fork 4
/
webpack.ng.js
33 lines (32 loc) · 961 Bytes
/
webpack.ng.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
const webpack = require("webpack");
const path = require("path");
module.exports = {
// entry point of our application
entry: ["./public/js/admin/admin.js"],
// where to place the compiled bundle
output: {
path: path.join(__dirname, "public/js/admin"),
filename: "bundle.js"
},
module: {
// `loaders` is an array of loaders to use.
// here we are only configuring vue-loader
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: "babel-loader",
query: {
presets: ["es2015", "stage-3"],
plugins: ["angularjs-annotate", "transform-runtime"]
}
},
{ test: /\.css$/, loader: "style-loader!css-loader" },
{ test: /\.html$/, loader: "html-loader", options: { minimize: true }}
]
},
plugins: [
new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /en-gb/),
//new webpack.optimize.UglifyJsPlugin()
]
};