-
-
Notifications
You must be signed in to change notification settings - Fork 321
/
Copy pathwebpack.config.js
39 lines (33 loc) · 903 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
35
36
37
38
39
var path = require('path');
module.exports = {
// Defines the entrypoint of our application.
entry: path.resolve(__dirname, 'src/angular-modal-service.js'),
// Bundle to ./dst.
output: {
path: path.resolve(__dirname, 'dst'),
filename: 'angular-modal-service.js'
},
// Make sure we include sourcemaps. This is for the bundled
// code, not the uglfied code (we uglify with npm run build,
// see package.json for details).
devtool: 'inline-source-map',
// Define externals (things we don't pack).
externals: {
angular: 'angular',
},
// All JavaScript code goes through the babel loader.
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
}
}
]
}
};