In this sample we are using the webpack to compile the tsx file and generate a whole bundle which can be used in static html page.
Please follow the below steps for using webpack compilation.
Install Node.js and npm (v6.6.0 or newer) if they are not already installed on your computer.
Verify that you are running at least node v6.x.x and npm 3.x.x by running
node -vandnpm -vin a terminal/console window. Older versions may produce errors.
Install the webpack globally using the following command after node installation.
npm i -g webpack@2.6.1
Use the following command to install the dependent npm packages from the command prompt.
npm install
Run the application by using following command:
npm start
Open your browser and navigate to http://localhost:3000/ to view the application.