2021-04-14 19:05:09 +02:00
|
|
|
/* eslint-disable @typescript-eslint/naming-convention */
|
2021-03-23 13:37:18 +01:00
|
|
|
const glob = require("glob");
|
|
|
|
const path = require("path");
|
2021-05-20 13:37:43 +02:00
|
|
|
const webpack = require("webpack");
|
2021-03-23 13:37:18 +01:00
|
|
|
|
|
|
|
const target = "web";
|
|
|
|
const distdir = path.join(__dirname, "dist", "web");
|
|
|
|
|
|
|
|
module.exports = [
|
|
|
|
{
|
|
|
|
// bundle used for Karma tests
|
|
|
|
target: target,
|
|
|
|
entry: glob.sync("./build/**/*.spec.js"),
|
|
|
|
output: {
|
|
|
|
path: distdir,
|
|
|
|
filename: "tests.js",
|
|
|
|
},
|
2021-05-20 13:37:43 +02:00
|
|
|
plugins: [
|
|
|
|
new webpack.ProvidePlugin({
|
|
|
|
Buffer: ["buffer", "Buffer"],
|
|
|
|
}),
|
|
|
|
],
|
2021-04-14 17:35:53 +02:00
|
|
|
resolve: {
|
|
|
|
fallback: {
|
2021-05-19 17:46:21 +02:00
|
|
|
buffer: false,
|
|
|
|
crypto: false,
|
|
|
|
events: false,
|
|
|
|
path: false,
|
2022-02-27 13:16:47 +01:00
|
|
|
stream: false,
|
2021-05-19 17:46:21 +02:00
|
|
|
string_decoder: false,
|
2021-04-14 17:35:53 +02:00
|
|
|
},
|
|
|
|
},
|
2021-03-23 13:37:18 +01:00
|
|
|
},
|
|
|
|
];
|