-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathwebpack.config.js
40 lines (39 loc) · 1.18 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
39
40
var webpack = require('webpack');
var CopyWebpackPlugin = require('copy-webpack-plugin');
var path = require('path');
module.exports = {
mode: 'development',
entry: {
SprintGoalApplicationInsightsWrapper: './dist/js/SprintGoalApplicationInsightsWrapper.js',
SprintGoal: './dist/js/sprint-goal.js',
SprintGoalWidget: './dist/js/widget.js',
SprintGoalWidgetConfiguration: './dist/js/widgetconfig.js',
SprintGoalAdmin: './dist/js/SprintGoalAdmin.js'
},
target: 'web',
output: {
path: path.resolve(__dirname, 'dist', 'sprint-goal'),
filename: '[name].js',
libraryTarget: "amd"
},
externals: [
{
},
/^VSS\/.*/, /^TFS\/.*/, /^q$/
],
plugins: [
new CopyWebpackPlugin({
patterns:[
{ from: "./node_modules/moment/min/moment.min.js", to: "moment.js" },
{ from: "./node_modules/jscolor-picker/jscolor.min.js", to: "jscolor.min.js" },
{ from: "./node_modules/vss-web-extension-sdk/lib/VSS.SDK.min.js", to: "VSS.SDK.js" },
{ from: './static', to: path.resolve(__dirname, 'dist', 'widget') }
]})
],
resolve: {
extensions: ['.js', '.css', '.scss'],
alias: {
"moment": "moment/min/moment.min.js"
}
}
};