You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to import a text file like this with the SystemJS text loading plugin, I get a compilation error about being unable to resolve an external module.
import html from './app.html!text';
I manually enabled debug logging in the TypeScript plugin and saw this in the console:
Yes, there doesn't seem to be a way to get this past the TypeScript compiler when using import. You will be able to do it using var html = require('./app.html!text') but that is not ideal.
I thought that the allowNonTsExtensions compiler setting might solve this (see #19) but as you say when assigning the result of the import to a variable the compiler still throws this error. It may be worth raising an issue with TypeScript to find out if this is/can be supported.
When I try to import a text file like this with the SystemJS text loading plugin, I get a compilation error about being unable to resolve an external module.
I manually enabled debug logging in the TypeScript plugin and saw this in the console:
It works fine when I don't try to import as a variable (i.e.
import from './app.html!text
), but then I don't have access to the text.The text was updated successfully, but these errors were encountered: