I just found about esm and would like to use it. I have a package which uses babel and transpiles code to lib folder on pre-publish hook
#!/bin/bash
NODE_BIN_PATH=node_modules/.bin;
rm -rf ./lib;
$NODE_BIN_PATH/babel \
-d ./lib/ src/ \
--ignore "*.spec.js,test.js";
How do I achieve this with the esm package?