-
Notifications
You must be signed in to change notification settings - Fork 126
Can't import named exports - (Affecting react, react-dom among others) #185
Comments
FWIW, adding them to the namedExports in the config does appear to work -- but I don't think I should have to be doing that for such a trivial case (which the docs say should work :) ). |
I did a quick check, and with Versions of |
Ah, I hate to be intrusive and tag you directly, I'm sure you're quite busy, but @Rich-Harris any chance you could take a look at this? This is a clear regression (with repro!) and I'm not going crazy, right? |
i encountered this as well: https://github.com/flying-sheep/rollup-typescript-test/tree/implicit-exports |
You need to explicitly name "MyFunction" in the namedExports config. Another alternative (which is interestingly observed and I'm not sure if this is intended):
|
Right, those are both workarounds, that should function (but adding tons of namedExports can get annoying fast). It used to work without needing |
I think I might have the same error with redux and redux-form, I've posted here en SO. Any workaround ? |
Experiencing the same issue with |
I've managed to solved many cases of named exports by using |
@kopax modulesOnly: true solved my problem. Thanks man. |
Hey folks (this is a canned reply, but we mean it!). Thanks to everyone who participated in this issue. We're getting ready to move this plugin to a new home at https://github.com/rollup/plugins, and we have to do some spring cleaning of the issues to make that happen. We're going to close this one, but it doesn't mean that it's not still valid. We've got some time yet before the move while we resolve pending Pull Requests, so if this issue is still relevant, please @ me and I'll make sure it gets transferred to the new repo. 🍺 |
Hi, I'm getting problems on
rollup
0.41.6 +rollup-plugin-commonjs
8.0.2 with importing named exports from react, react-dom, react-dates.I'm pretty sure this worked before, so I made this minimal example which causes issues (and as far as I am able to tell,
rollup-plugin-commonjs
should be able to handle). It works fine just babelifying it.I'm invoking
rollup -c
, here isrollup.config.js
:Here's my
index.js
And here's
node_modules/fake-repro-package/index.js
:This results in the error:
The text was updated successfully, but these errors were encountered: