These are chat archives for systemjs/systemjs

17th
Aug 2016
Manuel Schweigert
@Manuel-S
Aug 17 2016 13:54
hey
Yuriy Yarosh
@yuriy-yarosh
Aug 17 2016 13:54
o/
Manuel Schweigert
@Manuel-S
Aug 17 2016 13:54
I'm trying to import an html file as a string using systemjs (text plugin) in typescript
is there any way to bring typescript to not throw an error there?
import xposDialog from './XposDialog.html!text';
Yuriy Yarosh
@yuriy-yarosh
Aug 17 2016 15:28

Manuel, you should specify explicitly that you're using system.js modules in the TS config itself. Like, so:

System.config({
  typescriptOptions: {
    module: "system",
    noImplicitAny: true,
    typeCheck: true, 
    tsconfig: true   
  }
});

The problem that your TS is handling modules without knowing anything about System.js plugins and respective environment.