-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathwebpack.config.test.js
59 lines (59 loc) · 1.44 KB
/
webpack.config.test.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const path = require("path")
module.exports = {
mode: 'development',
devtool: 'source-map',
devServer: {
static: 'example/',
compress: false,
allowedHosts: 'all',
devMiddleware: {
mimeTypeDefault: 'text/xml',
mimeTypes: {
'.tmx': 'text/xml',
'.tsx': 'text/xml',
'.tx': 'text/xml',
'.tmj': 'application/json',
'.tsj': 'application/json',
'.tj': 'application/json',
}
},
},
entry: {
formats: './example/formats/formats.ts',
orthogonal: './example/orthogonal/orthogonal.ts',
'orthogonal-infinite': './example/orthogonal-infinite/orthogonal-infinite.ts',
isometric: './example/isometric/isometric.ts',
'isometric-infinite': './example/isometric-infinite/isometric-infinite.ts',
},
output: {
filename: '[name]/[name].js',
path: path.resolve(__dirname, 'example'),
libraryTarget: "umd"
},
module: {
rules: [
{
test: /\.ts$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
resolve: {
fallback: {
fs: false
},
extensions: [".ts", ".js"],
alias: {
"@excalibur-tiled": path.resolve(__dirname, './src/')
}
},
externals: {
"jsdom": {
commonjs: "JSDOM",
commonjs2: "JSDOM",
amd: "JSDOM",
root: "JSDOM"
}
},
};