Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rollup): Allow rollup to process 'import * as classNames' #34

Merged
merged 1 commit into from Mar 23, 2017

Conversation

christopherthielen
Copy link
Member

From this comment: rollup/rollup#670 (comment)

This seems to fix the issue with rollup. Gross.

@elboman
Copy link
Member

elboman commented Mar 22, 2017

I don't understand why this fixes the problem :/
Was also wondering if we can simply do:

import classNames from 'classnames';

and let TS fill the synthetic default import for the lib

@christopherthielen
Copy link
Member Author

christopherthielen commented Mar 22, 2017

Was also wondering if we can simply do:

import classNames from 'classnames';

I tried that and it does not work (not sure why). It got transpiled to classnames_1.default and there is no export named default from classnames

Try the simple import classNames from 'classnames' then run npm run dev and see the error

@elboman
Copy link
Member

elboman commented Mar 23, 2017

Yeah I tried but I doesn't work. I guess we'll keep it until we'll find a better solution.

The strange thing is that TS should synthetically create the default export if it's not there.

Furthermore we import react with the same import * as React from 'react' syntax and rollup does not complain about that.

@elboman elboman merged commit e066851 into master Mar 23, 2017
@christopherthielen
Copy link
Member Author

Furthermore we import react with the same import * as React from 'react' syntax and rollup does not complain about that.

But we're not calling React as a function, which is what rollup is complaining about.

@christopherthielen christopherthielen deleted the issue-33 branch March 23, 2017 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants