Support node13#2451
Conversation
|
Size Change: 0 B Total Size: 39.2 kB ℹ️ View Unchanged
|
|
I think I would prefer to try |
I wouldn't mind trialing it |
That route also feels more right to me but iirc that broke CJS consumers when I tried it, because Node will import the CJS entry point but try to parse it as an ES Module. |
| "import": "./debug/dist/debug.module.js" | ||
| }, | ||
| "./devtools": { | ||
| "browser": "./devtools/dist/devtools.module.js", |
There was a problem hiding this comment.
Good catch about the missing devtools package 👍 💯
|
@nsivertsen I think we could potentially get around that by renaming the commonjs entry modules to |
|
@developit Yeah, I feared that might cause similar problems for tooling as using |
marvinhagemeister
left a comment
There was a problem hiding this comment.
Awesome! I'm glad to see those pesky compatibility issues being gone 🙌 Great work all around 💯
Creates conditional export that points "import" conditional exports to mjs files. This lets node load the esm version with having to set "type": "module" on the main package.json. This is similar to the approach in the main preact repo - preactjs/preact#2451
Creates conditional export that points "import" conditional exports to mjs files. This lets node load the esm version with having to set "type": "module" on the main package.json. This is similar to the approach in the main preact repo - preactjs/preact#2451
Creates conditional export that points "import" conditional exports to mjs files. This lets node load the esm version with having to set "type": "module" on the main package.json. This is similar to the approach in the main preact repo - preactjs/preact#2451
In node v13 we either need to end our modular file in
.mjsor have amodule: trueentry in our package json to resolve as a module