Skip to content

Commit 1bc610c

Browse files
committed
chore: build mjs (ES Module) bundle
1 parent 14074e8 commit 1bc610c

File tree

1 file changed

+29
-19
lines changed

1 file changed

+29
-19
lines changed

web-public/rollup.config.js

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
11

2-
export default {
3-
input: "src/index.js",
4-
output: {
5-
file: "webmscore.js",
6-
format: "iife",
7-
name: 'WebMscore',
8-
exports: 'default',
9-
sourcemap: false,
10-
},
11-
plugins: [
12-
{
13-
resolveImportMeta(property) {
14-
if (property === 'url') {
15-
return '""';
16-
}
17-
return null;
18-
},
2+
export default [
3+
{
4+
input: "src/index.js",
5+
output: {
6+
file: "webmscore.js",
7+
format: "iife",
8+
name: 'WebMscore',
9+
exports: 'default',
10+
sourcemap: false,
1911
},
20-
],
21-
}
12+
plugins: [
13+
{
14+
resolveImportMeta(property) {
15+
if (property === 'url') {
16+
return '""';
17+
}
18+
return null;
19+
},
20+
},
21+
],
22+
},
23+
{
24+
input: "src/index.js",
25+
output: {
26+
file: "webmscore.mjs",
27+
format: "esm",
28+
sourcemap: false,
29+
}
30+
}
31+
]

0 commit comments

Comments
 (0)