This repository was archived by the owner on Feb 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathkarma-webpack.config.js
More file actions
71 lines (69 loc) · 2.34 KB
/
karma-webpack.config.js
File metadata and controls
71 lines (69 loc) · 2.34 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
const webpack = require("webpack");
const path = require("path");
const widgetName = require("./package").widgetName;
module.exports = {
entry: {
ColumnChart: "./src/ColumnChart/components/ColumnChartContainer.ts",
BarChart: "./src/BarChart/components/BarChartContainer.ts",
LineChart: "./src/LineChart/components/LineChartContainer.ts",
AreaChart: "./src/AreaChart/components/AreaChartContainer.ts",
PieChart: "./src/PieChart/components/PieChartContainer.ts",
TimeSeries: "./src/TimeSeries/components/TimeSeriesContainer.ts",
HeatMap: "./src/HeatMap/components/HeatMapContainer.ts",
BubbleChart: "./src/BubbleChart/components/BubbleChartContainer.ts"
},
output: {
path: path.resolve(__dirname, "dist/tmp/src"),
filename: "com/mendix/widget/custom/[name]/[name].js",
chunkFilename: `com/mendix/widget/custom/${widgetName.toLowerCase()}/chunk[id].js`,
libraryTarget: "umd",
publicPath: "widgets/"
},
resolve: {
extensions: [ ".ts", ".js" ],
alias: {
"tests": path.resolve(__dirname, "./tests")
}
},
devtool: "eval",
module: {
rules: [
{ test: /\.css$/, use: "raw-loader" },
{ test: /\.scss$/, use: [
{ loader: "raw-loader" },
{ loader: "sass-loader" }
] },
{
test: /\.ts$/,
exclude: /(node_modules)/,
use: [
{
loader: "babel-loader",
options: {
presets: [ "babel-preset-env" ],
plugins: [
"babel-plugin-transform-async-to-generator",
"babel-plugin-transform-regenerator"
]
}
},
{
loader: "ts-loader",
options: { configFile: "karma-tsconfig.json" }
}
]
}
]
},
externals: [
"react/lib/ExecutionEnvironment",
"react/lib/ReactContext",
"react/addons",
"jsdom"
],
plugins: [
new webpack.LoaderOptionsPlugin({
debug: true
})
]
};