Where target must be esm for the feature to be enabled and library refers to the library name that will also be the variable exported by the module itself.
Logic-wise, Webpack does not support targeting ESM so the implemented workaround involves targeting var (the whole bundle contained in a variable) and exporting that variable using the ES module syntax.
This change allows eth-connect to be bundled and consumed inside DCL's parcels.
This branch enables the decentraland-compiler to bundle ES modules when specified.
Example build file:
Where target must be
esm
for the feature to be enabled andlibrary
refers to the library name that will also be the variable exported by the module itself.Logic-wise, Webpack does not support targeting ESM so the implemented workaround involves targeting
var
(the whole bundle contained in a variable) and exporting that variable using the ES module syntax.This change allows eth-connect to be bundled and consumed inside DCL's parcels.