Closed ysulyma closed 3 months ago
I'm not sure what's wrong in your setup. It usually common to import from "next/navigation"
and not from "next/navigation.js"
so I can't approve this PR. Same apply for the esbuild rewrite script.
Happy to approve the export type *
fix for the types.ts
file.
Thanks for the library. This PR fixes ~two~ three issues I was encountering:
types.mjs
file since it didn'texport
anything; changing toexport type *
removes this export from the emitted JS.mjs
extensions to imports as required by ESM (somehow my code was loading both the ESM and CJS versions, and then complaining that it couldn't find<CookiesProvider>
)import { /* ... */ } from "next/navigation"
toimport { /* ... */ } from "next/navigation.js"
Your original code was working for me at one point, so I don't know why it suddenly started breaking, and I wasn't able to put together a minimal repro. These are all how ESM is supposed to work though.