-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathbrowser.test.config.js
77 lines (76 loc) · 1.98 KB
/
browser.test.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
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
72
73
74
75
76
77
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const NodePolyfillWebpackPlugin = require('node-polyfill-webpack-plugin');
module.exports = {
mode: 'development',
devtool: 'source-map',
entry: './test/browserTests.js',
plugins: [
new NodePolyfillWebpackPlugin(),
new CopyPlugin({
patterns: [
{
from: 'canvaskit/*',
to: '.',
},
{
from: 'node_modules/rtree-sql.js/dist/sql-wasm.wasm',
to: '..',
},
{
from: 'node_modules/mocha/*',
to: '..',
},
],
}),
],
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: [/node_modules/],
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
fallback: {
fs: false,
http: false,
https: false,
},
alias: {
'@ngageoint/projections-js': path.join(__dirname, './node_modules/@ngageoint/projections-js/dist/index.js'),
'@ngageoint/simple-features-js': path.join(
__dirname,
'/node_modules/@ngageoint/simple-features-js/dist/index.js',
),
'@ngageoint/simple-features-proj-js': path.join(
__dirname,
'/node_modules/@ngageoint/simple-features-proj-js/dist/index.js',
),
'@ngageoint/simple-features-wkb-js': path.join(
__dirname,
'/node_modules/@ngageoint/simple-features-wkb-js/dist/index.js',
),
'@ngageoint/simple-features-wkt-js': path.join(
__dirname,
'/node_modules/@ngageoint/simple-features-wkt-js/dist/index.js',
),
'@ngageoint/simple-features-geojson-js': path.join(
__dirname,
'/node_modules/@ngageoint/simple-features-geojson-js/dist/index.js',
),
},
},
output: {
filename: 'browser.test.bundle.js',
path: path.resolve(__dirname, 'test', 'bundle'),
library: {
name: 'geopackage',
type: 'umd',
},
},
externals: ['better-sqlite3'],
};