score:0

your are trying to use jsx/tsx syntax in a regular typescript ts file. rename the index.ts to index.tsx and then modify the entry in webpack config to './src/index.tsx'.

alternately, if you want to keep using the .ts extension for your index.ts file, then manually create vdom element as:

import * as react from 'react';

reactdom.render(
  react.createelement(app),
  document.getelementbyid('app'));

Related Query

More Query from same tag