do not bundle es module multiple times

This commit is contained in:
Yanzhen Yu
2021-07-01 10:57:54 +08:00
parent 8082b05254
commit ab1bc47834

View File

@@ -80,7 +80,9 @@ const baseConfigs = [
input: './src/entries/all.ts',
name: 'rrweb',
pathFn: toAllPath,
esm: true,
},
// plugins
{
input: './src/plugins/console/record/index.ts',
name: 'rrwebConsoleRecord',
@@ -146,6 +148,7 @@ for (const c of baseConfigs) {
},
],
});
if (c.esm) {
// ES module
configs.push({
input: c.input,
@@ -160,6 +163,7 @@ for (const c of baseConfigs) {
],
});
}
}
if (process.env.BROWSER_ONLY) {
const browserOnlyBaseConfigs = [