In my Ionic2 project I imported a JSON file with this statement:
import * as data from './data.json';
I also created the file typings.d.ts
in the project's root directory with this contents:
declare module "*.json" {
const value: any;
export default value;
}
As suggested here. But this does not work as intended, the module still cannot be found. Downloading the sample project from this tutorial and running it works fine. though, I cannot spot any difference between this project and my own, besides that my files reside in /project/src/pages/page.ts
.