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:
@@ -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',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user