-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
43 lines (41 loc) · 1.21 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
41
42
43
var webpack = require("webpack");
var path = require("path");
var CopyWebpackPlugin = require("copy-webpack-plugin");
module.exports = {
entry: "./src/TimeSeries/widget/TimeSeries.ts",
output: {
path: __dirname + "/dist/tmp",
filename: "src/TimeSeries/widget/TimeSeries.js",
libraryTarget: "umd",
umdNamedDefine: true,
library: "TimeSeries.widget.TimeSeries"
},
resolve: {
extensions: [ "", ".ts", ".tsx", ".js", ".json" ]
},
errorDetails: true,
module: {
loaders: [
{ test: [/\.tsx?$/, /\.ts?$/], loaders: [ "ts-loader" ] },
{ test: /\.json$/, loader: "json" }
],
postLoaders: [ {
test: /\.ts$/,
loader: "istanbul-instrumenter",
include: path.resolve(__dirname, "src"),
exclude: /\.(spec)\.ts$/
} ],
},
devtool: "source-map",
externals: [ "mxui/widget/_WidgetBase", "mendix/lang", "dojo/_base/declare" ],
plugins: [
new CopyWebpackPlugin([
{ from: "src/**/*.js" },
{ from: "src/**/*.xml" },
{ from: "src/**/*.css" },
], {
copyUnmodified: true
})
],
watch: true
};