forked from Azure/autorest.typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.test.js
More file actions
56 lines (51 loc) · 1.28 KB
/
webpack.config.test.js
File metadata and controls
56 lines (51 loc) · 1.28 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
const { readdirSync, statSync } = require("fs");
const { join: joinPath, sep, extname } = require("path");
function getIntegrationTestFiles() {
let hlcDirPath = joinPath(__dirname, "test-browser", "integration");
let hlcFiles = readdirSync(hlcDirPath);
let rlcDirPath = joinPath(__dirname, "test-browser", "rlcIntegration");
let rlcFiles = readdirSync(rlcDirPath);
hlcFiles = hlcFiles
.filter(
name =>
extname(name) === ".js" &&
statSync(`${hlcDirPath}${sep}${name}`).isFile()
)
.map(filename => `${hlcDirPath}${sep}${filename}`);
rlcFiles = rlcFiles
.filter(
name =>
extname(name) === ".js" &&
statSync(`${rlcDirPath}${sep}${name}`).isFile()
)
.map(filename => `${rlcDirPath}${sep}${filename}`);
return [...hlcFiles, ...rlcFiles];
}
const entry = getIntegrationTestFiles();
module.exports = {
target: "web",
entry,
output: {
filename: "index.js",
path: joinPath(__dirname, "test-browser")
},
module: {
rules: [
{
test: /\.js$/,
enforce: "pre",
use: ["source-map-loader"]
}
]
},
ignoreWarnings: [
{
module: /opentelemetry/
},
{
module: /core-asynciterator-polyfill/
}
],
mode: "development",
devtool: "inline-source-map"
};