mattiamanzati / typings-material-ui

Typings from callemall/material-ui project as NPM Module
MIT License
3 stars 2 forks source link

could not import from 'material-ui', must use 'material-ui/index' instead #1

Closed mattiamanzati closed 8 years ago

mattiamanzati commented 8 years ago

TypeScript Version: 2.0.0

Typeings Version: master

Code

// this will throw error
import {AppBar} from 'material-ui'

// this works fine
import {AppBar} from 'material-ui/index'

Expected behavior: "/index" should not be necessary; is there any config to perform with the typings.json file? Unfortunately I don't know how to solve it atm.

Actual behavior: "/index" is required, "material-ui" seems to be not declared.

alitaheri commented 8 years ago

I've had this issue with typings before. It fails to resolve index when bundling. type adding main: index.d.ts to typings.json not sure if it will be fixed, if not then try renaming to main.d.ts with main: main.dts in typings.json.

mattiamanzati commented 8 years ago

Yeah, that was the gist! Fixed!