1.0.3 • Published 4 years ago
rollup-esm-template v1.0.3
rollup-esm-template
Building a tree shaking package using rollup.
Requirements
- Set a
slideEffect: falseflag inpackage.json
"sideEffects": false,- Make all export to input
- Setting output to
esm
export default {
input: ["src/*.ts"],
output: {
dir: pkg.module,
format: "esm",
},
plugins: [commonjs(), typescript(), resolve(), multiInput()],
};- Build it!
Usage
import { foo } from "rollup-esm-template";
foo();For that, the bar function in rollup-esm-template will not build into bundle by tree shaking.
1.0.3
4 years ago