dune file:
(library
(name code_mirror)
(js_of_ocaml (javascript_files ./babel_out.js))
(libraries brr js_of_ocaml))
Now, what format is “babel_out.js” expected to be in ?
Consider the following Makefile:
default:
# esbuild includes.js --target=es6 --format=esm --bundle --outfile=out.js
esbuild includes.js --bundle --outfile=es_out.js
./node_modules/@babel/cli/bin/babel.js es_out.js --config-file ./babel.config.js -o babel_out.js
jsoo is NOT happy with the file es_out.js (parsing error), but okay with the file babel_out.js
My babel.config.js is:
cat babel.config.js
module.exports = {
presets: ["@babel/env"],
plugins: ["@babel/transform-property-mutators"],
compact: true
};
===
I’m trying to drop the babel.js step and only use esbuild, as esbuild is very fast and babel.js is very slow.