example repo https://github.com/github0013/typescript_react
I need to load images in base64 string embeded into tag, but importing image files will raise this error.
TS2307: Cannot find module './Octocat.jpg'.
https://github.com/github0013/typescript_react/commit/6670f3ca74404007ad1ed6e4ab0d111f547ee75d
I am still new to typescript, webpack and react, and I am sure I am confused typescript's import
and webpack's.
How do I enable url-loader
for images? and is this even valid?
https://github.com/github0013/typescript_react/blob/master/config/webpack/environment.js
--
I did try require
but it will just return image's path instead of base64 stirng.
// global.d.ts
declare function require(string): string;