-
Notifications
You must be signed in to change notification settings - Fork 45
Remove next.js as peer dependency #2
Comments
There is no such package next/image, it is just a folder inside next package, so, you cannot install it separately. Moreover, you can't use it separately without NextJs because it relies on NextJs server to optimize images on demand. I guess you would need to find another solution if you want image optimization. |
@sugamxp I'm aware that there's only one peer dep This is just a note to myself that we need to offer a way to not depend on I already offer an elegant solution to working around this problem for https://github.com/NotionX/react-notion-x where the consumer of the library provides their own override for an |
+1, decoupling from Next would be appreciated. Had to copy this project's source to be able to use. Also decoupling from There is also the problems of reading a NextJS env variable (process.env.NEXT_THING => process is undefined unless you add some webpack tweaks). You should rather:
|
I would also vouch for removing at least vercel/next.js#18356 (It is probably possible to use SSG on the late version of |
@slorber yep it's already a monorepo w/ multiple packages 😉 We just need to have the core next.js parts be opt-in via a Provider as you've suggested — as I've done for several of my other projects like https://github.com/NotionX/react-notion-x Definitely lots that can be improved && very open to PRs 😄 |
More context around this:
|
@louisbarclay did you add |
@transitive-bullshit No - I didn't. Do I need to? |
@louisbarclay yes. |
This would be great! We currently have a giant page of tweets and our fast-and-rough way of just embedding tweets slows it a lot. Though i'd love to migrate the website to Next.js, we use Gatsby, so being able to use these pkgs would be great. Is there a list of the specific changes that should be done to this project to make it Next.js-agnostic? (Otherwise i'll have to try to extract the styled tweet component for our website. Thanks in any case!) |
Since the PR title isn't very clear on this: The PR above makes this package decoupled from Next.js. #38 |
react-static-tweets
currently depends onnext/image
andnext/link
directly.We should abstract these out so Next.js isn't required as a peer dependency.
The text was updated successfully, but these errors were encountered: