-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrollup.test.mjs
52 lines (50 loc) · 1.53 KB
/
rollup.test.mjs
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
/*
* Copyright 2024 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
* The BSD-3-Clause license for this file can be found in the LICENSE.txt file included with this distribution
* or at https://spdx.org/licenses/BSD-3-Clause.html#licenseText
*/
import commonjs from '@rollup/plugin-commonjs';
import copy from "rollup-plugin-copy";
import {nodeResolve} from '@rollup/plugin-node-resolve';
export default [
{
input: ["test/js/mock-dapper.mjs"],
// suppress eval warnings because emscripten needs DYNAMIC_EXECUTION=1 in current configuration
onwarn(warning, warn) {
if (warning.code === 'EVAL') {
return;
}
warn(warning);
},
output: [
{
dir: "build/target/test-dapper",
format: "esm",
sourcemap: true
}
],
plugins: [
nodeResolve(),
commonjs(),
copy({
targets: [
{
src: "src/wasm/build_wasm/*.wasm",
dest: "build/target/test-dapper"
},
{
src: "test/data/dataset.mjs",
dest: "build/target/data",
transform: contents => contents.toString().replaceAll("../data/dataset", "./data/dataset")
}
]
})
],
watch: {
clearScreen: false
}
}
];