Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

How to add option to rollup config? #221

Open
betfix opened this issue Apr 3, 2020 · 6 comments
Open

How to add option to rollup config? #221

betfix opened this issue Apr 3, 2020 · 6 comments

Comments

@betfix
Copy link

betfix commented Apr 3, 2020

One of my files has this import:
import { createPortal } from "react-dom";

During build it's getting an error:
Error: 'createPortal' is not exported by node_modules\react-dom\index.js

I found a similar issue here:
rollup/rollup-plugin-node-resolve#58
and the solution may be to add namedExports to rollup.config.js

But the rollup config seems to come from microbundle. How to customize it with namedExports?

@transitive-bullshit
Copy link
Owner

Customizing your rollup config isn't supported at the moment for CRL v3.

I'd recommend opening an issue over at microbundle and tagging this issue.

@kdela
Copy link

kdela commented Apr 9, 2020

It seems like wrong decision for me. You've just made a proxy for microbundle. It would be better to bring back possibility to edit rollup config and mark repository as 'no maintenance'.
It became useless (for me at least)

@transitive-bullshit
Copy link
Owner

@kdela PRs are more than welcome.

@kdela
Copy link

kdela commented Apr 12, 2020

@kdela PRs are more than welcome.

It's not about PR, everyone can make it work just by using older version or make this configuration by themselves. I didn't meant to be rude, but If you had enough time to migrate that package to microbundle, you could just mark this repository as not supported anymore and nobody would say bad word on that.

Now you have many confused users which keep posting questions about rollup file which not longer exists, because you've changed that tool completely without single comment.

@transitive-bullshit
Copy link
Owner

Now you have many confused users which keep posting questions about rollup file which not longer exists, because you've changed that tool completely without single comment.

There were several long threads about the move to simplify CRL (here and here), with microbundle ultimately being the simplest option.

Just like how CRA constrains you in order to make maintainability, support requests, and future development significantly easier, CRL is taking the exact same approach.

If you don't like the changes, and don't want to put the effort via pitching in via PRs, then constructive feedback is more than welcome.

For example, instead of suggesting that I should've marked this as no maintenance without having any real understanding of the amount of work and effort I've put into CRL over the years, it would be much more constructive to think about ways to support custom babel and rollup options while keeping the simplicity and overall ease of use that CRL v3 introduces.

As with all of open source, I've spent a great deal of time working on this project for free and I would encourage you to be more mindful and positive when discussing something that has clearly already provided you a lot of help for free.

Thanks.

@DominickVale
Copy link

If anyone is still encountering this issue as I did: just add react-dom to the peer dependencies.
This solved it for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants