Configurable routes for an external html from with in react app

(Sarathspillai) #1

I am planning to create a react app with routes that need to be configured externally from react app.For my scenario I have different sets of html that need to be shown in different routes from a react app.
Currently I do not have the exact number of htmls that I will use,but I should be able to add the routes with out changing the code in a configurable way.
Can some one please suggest a proper way to do this using any appropriate react techniques?


(Mikayel) #2

You can use webpack2 import functionality. You don’t need to change any config, webpack will generate all possible versions four your files.

I have example code here it may help you