Update rollup

With rollup's preserveModules option and the sideEffects flag in
package.json, now we have the power of tree shaking.
This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent dcad6ff922
commit 4209ea7fe8
4 changed files with 19 additions and 24 deletions

View File

@@ -98,22 +98,11 @@ for (const c of baseConfigs) {
configs.push({
input: c.input,
plugins,
preserveModules: true,
output: [
{
format: 'esm',
file: c.pathFn(pkg.module),
},
],
});
// ES module + minify
configs.push({
input: c.input,
plugins: minifyPlugins,
output: [
{
format: 'esm',
file: toMinPath(c.pathFn(pkg.module)),
sourcemap: true,
dir: 'es/rrweb',
},
],
});