Open mike-rivera opened 4 years ago
I created the following gist to simulate my problem. https://gist.github.com/mike-rivera/5838b9c2d25d14e234648349ed0c1ee2
I created an npm package using ESM that comes from a local npm registry and I have the following:
package
client
When I run the script I get the following error on line 3 of my-client-script
TypeError: MyClass is not a constructor
if I install esm on the the client script to it works. This is a concern since not all of my clients applications will have esm installed.
esm will need to be listed as a dependency in your library. not a devDependency.
I created the following gist to simulate my problem. https://gist.github.com/mike-rivera/5838b9c2d25d14e234648349ed0c1ee2
I created an npm package using ESM that comes from a local npm registry and I have the following:
package
client
When I run the script I get the following error on line 3 of my-client-script
TypeError: MyClass is not a constructor
if I install esm on the the client script to it works. This is a concern since not all of my clients applications will have esm installed.