frankwallis / plugin-typescript

TypeScript loader for SystemJS
MIT License
248 stars 47 forks source link

Undefined when importing a property from object #188

Closed JulianIsrael closed 7 years ago

JulianIsrael commented 7 years ago

Edit: this was a change from systemjs, so that is expected. When I use import { render } from 'react-dom' console.log(render) // undefined. this is my config: typescriptOptions: { "allowJs": true, "tsconfig": false, "typeCheck": false, "module": "system", "target": "es5", "emitDecoratorMetadata": true, "experimentalDecorators": true, "jsx": "react", "moduleResolution": "node", "preserveConstEnums": true, "removeComments": true, "noEmitHelpers": false, "importHelpers": false, "allowSyntheticDefaultImports": true, "sourceMap": true }

edit: I'm now having this issue with the bundle that I got after updating the plugin: Cannot read property 'moduleObj' of undefined when importing a module using System. This works in development environment but not after running jspm bundle.

outring commented 7 years ago

+1 here, the same config works with System 0.19 but doesn't with 0.20

frankwallis commented 7 years ago

I believe this is a duplicate of https://github.com/frankwallis/plugin-typescript/issues/185 - with systemjs@0.20 you can no longer used named imports from commonjs modules.