Julian Grinblat

Results 122 comments of Julian Grinblat

Well, you are right, we only really need one build of the esm (the `mjs` one, or add `type: "module"` to package.json and change the cjs build instead). I left...

I think the better approach here would be to add `type: module` instead and change the name of the commonjs build to `cjs` (that's what I did in my own...

Tried this approach! Hoping I didn't miss anything I can't find where I can sign the remix cla, link appears to be [broken](https://github.com/remix-run/cla-bot)

@mcansh thanks! Well, turns out the esm build fails to load due to `history` not being esm: ``` > import("./build/node_modules/react-router/index.js").then(console.log) Promise { , [Symbol(async_id_symbol)]: 38, [Symbol(trigger_async_id_symbol)]: 27, [Symbol(destroyed)]: { destroyed:...

Attempted to add tests for the imports, but unfortunately there is another issue, `jest` is doing some extra magic and `import(...)` seems to be using some experimental `vm.SyntheticModule` API: https://jestjs.io/docs/ecmascript-modules,...

@ryanflorence I just cleaned up the PR and fixed the tests I really wanted to add regression tests for the exports field in here, but unfortunately that is blocked by...

Just wanted to note that `react@18` added the `exports` field to their `package.json` file as well. [Here](https://github.com/facebook/react/blob/e531a4a62d0b88301ac06d4efd3f5a30faa03c94/packages/react-dom/package.json#L40) is how they did it. Is there a reason this isn't merged yet?

Yeah, those changes do solve my issue! Do note though that `react` is [using `exports` fields](https://github.com/facebook/react/blob/main/packages/react-dom/package.json#L40) now, and doing `import { StaticRouter } from "react-router-dom/server.mjs";` is not very nice ergonomics....

Just using the bare minimum needed to get my project running: ``` $ cat patches/react-router-dom+6.3.0.patch diff --git a/node_modules/react-router-dom/package.json b/node_modules/react-router-dom/package.json index 1d4ca0e..a4fc8a1 100644 --- a/node_modules/react-router-dom/package.json +++ b/node_modules/react-router-dom/package.json @@ -12,6 +12,10 @@...

I've been solving conflicts for many months, but I feel there is no real interest in merging this so I kinda gave up, and also there were changes made in...