bloomer
bloomer copied to clipboard
Problems with Rollup and Bloomer
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: https://github.com/rollup/rollup/issues/670#issuecomment-223046229
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....
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?
@AlgusDark are you still here?