-
Notifications
You must be signed in to change notification settings - Fork 467
Expand file tree
/
Copy pathwebpack.config.js
More file actions
42 lines (41 loc) · 980 Bytes
/
webpack.config.js
File metadata and controls
42 lines (41 loc) · 980 Bytes
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
const path = require('path');
const projectRoot = path.join(__dirname, '../..');
const includes = [path.join(projectRoot, 'src')];
module.exports = {
name: 'merge-android-profiles',
target: 'node',
mode: process.env.NODE_ENV,
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
alias: {
'firefox-profiler-res': path.resolve(projectRoot, 'res'),
},
},
output: {
path: path.resolve(projectRoot, 'dist'),
filename: 'merge-android-profiles.js',
},
entry: './src/merge-android-profiles/index.ts',
module: {
rules: [
{
test: /\.(ts|tsx)$/,
use: ['babel-loader'],
include: includes,
},
{
test: /\.js$/,
include: path.resolve(projectRoot, 'res'),
type: 'asset/resource',
},
{
test: /\.svg$/,
type: 'asset/resource',
},
],
},
experiments: {
// Make WebAssembly work just like in webpack v4
syncWebAssembly: true,
},
};