I am building an application with react+grails, where grails is the wrapper. However, the react application is based on Create React App, due to this the output template of react is index.html. However, grails don't allow rendering .html files. So, is there anyway to use thymeleaf instead of gsp ?
I have other ways like render text: htmlText, contentType:"text/html", encoding:"UTF-8" but this seems very hacky.
Yes. One way to do that is to use the Spring Boot Thymeleaf support.
That isn't true. We render
.htmlfiles all the time. You can render any static file from a Grails app, including.htmlfiles.EDIT:
See the project at github.com/jeffbrown/ganeshkhadkahtml.
If you run that app and send a request to http://localhost:8080/showMeSomeHtml that will render the HTML file at src/main/webapp/static/index.html.
You could also send a request to http://localhost:8080/static/index.html to render that same file if you wanted to support that.