Closed DEfusion closed 5 months ago
We're also seeing this issue
can you try:
import Idiomorph from 'idiomorph.umd';
(I think)
We split all the different types of modules out into various module-files
I managed to get this working. We were seeing the issue in Jest which turned out to be a transformer issue. I added the following to our jest config:
"transformIgnorePatterns": [ "node_modules/(?!(idiomorph)/)" ]
and importing like this: import { Idiomorph } from "idiomorph/dist/idiomorph.esm";
I hope this gives others some clues for their issue.
and importing like this:
import { Idiomorph } from "idiomorph/dist/idiomorph.esm";
I hope this gives others some clues for their issue.
Thanks for the tip @MaxHatfull, works for me with:
import { Idiomorph } from "idiomorph/dist/idiomorph.esm";
window.Idiomorph = Idiomorph;
Also using import { Idiomorph } from 'idiomorph/dist/idiomorph.esm.js';
- perhaps the module
key is simply missing from package.json
to point to this file?
Fix Proposed in #35.
If I try using 0.3.0 with webpack (we're on 4, moving to esbuild shortly) & babel I get an error that
Idiomorph.morph
is undefined, if I do the following:I get an empty object logged.
For now I'm just sticking on 0.2.0. I don't know enough about the craziness of providing the different module formats via packages but I know I've seen entries in
package.json
for other projects that are like:Sorry if that doesn't help.