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

Problems with Rollup and Bloomer #112

Open
alerizzo opened this issue Aug 24, 2018 · 2 comments
Open

Problems with Rollup and Bloomer #112

alerizzo opened this issue Aug 24, 2018 · 2 comments

Comments

@alerizzo
Copy link

Suddenly, I stop being able to publish a library that uses bloomer with rollup during its deploy. The error was with the classNames import, but actually, it was with every import that was not a namespace. So, in bloomer all imports are written in the form import * as ______ from ______;

This seems ok for namespaces, but it is not for functions. So, is ok for React, but wrong for classNames. If you import functions like import ______ from ________; there's no problem at all....

Here is the source to the rollup discussion: rollup/rollup#670 (comment)

I'm not sure if this is a rollup problem, or a bloomer problem.... But people at rollup says is wrong to import a function as a namespace. So....

@AlgusDark
Copy link
Owner

That's true, actually this was because of the version of TS. Thanks to bring this issue. What we need here is upgrade TS and add this in our tsconfig.json:

"allowSyntheticDefaultImports": true,
"esModuleInterop": true,

Then we need to refactor all of our imports from import * as XXX from 'XXX' to import XXX from 'XXX'. For now I'm having a lot of issues with internet (moving to Japan and they are not very English friendly :/ ). You want to do that change, check your rollup and then make a PR for this change?

@alerizzo
Copy link
Author

@AlgusDark are you still here?

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

Successfully merging a pull request may close this issue.

2 participants