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
2020-04-07 22:11:46 +08:00
parent 4f36d0e57d
commit 8a1d74f6cb
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',
},
],
});