jacob-ebey / styled-components-ts

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress and the added benefits of TypeScript 💅
Do What The F*ck You Want To Public License
150 stars 5 forks source link

styled_components_ts___default(...) is not a function #1

Closed rr-kalbeck closed 6 years ago

rr-kalbeck commented 7 years ago

hi.. i'm getting the following error..

__WEBPACK_IMPORTED_MODULE_1_styled_components_ts___default(...) is not a function

import styled from 'styled-components';
import styledProps from 'styled-components-ts';

interface FooStyledProps {
    bg : string;
}

const FooStyled = styledProps<FooStyledProps>( styled.div )`
    ul {
        li {
            background: ${ ( props ) => props.bg };
        }
    }
`;

export { FooStyled as default };

am i doing something wrong?

nderscore commented 6 years ago

Bump 😄

It looks like the compiled library in dist/ is empty when importing this package from npm?

@jacob-ebey

andrewl913 commented 6 years ago

this is still an issue, our team is running into the same error

jacob-ebey commented 6 years ago

Sorry for the delay on this. This should be fixed on version 0.0.8.

jacob-ebey commented 6 years ago

It's the damn circleci config. Will fix tonight/tomorrow unless someone else wants to submit a PR that:

1.) adds 'persist to workspace' to the build job in the circleci config 2.) verifys the whitelist for persisting to workspace in the circleci config 3.) verifys npmignore 4.) increments npm version

jacob-ebey commented 6 years ago

Fixed in version 0.0.13. The new NPM package looks like:

- .npmignore
- LICENSE
- package.json
- README.md
- lib
    - styled-components-ts.d.ts
    - styled-components-ts.js