Hi,
First of all. Thanky you for your job! 🙂
I already spend few hours with unsuccessful configuring of historyApiFallback
So I set in union.config.js:
devServer: {
historyApiFallback: true,
},
It look that it works well, but problem is that history-api-fallback serve index.html as default and not index.ejs
so if i rename index.ejs to index.html and history-api-fallback starts to work only for nested path (like localhost:3300/a/b) because root still goes to index.ejs
so I added to union.config.js:
templateFilename: 'index.html',
Now it looks like that it works but if I go to:
localhost:3300/something/id/something
it does not render and load any wigets. (maybe some bad relative paths of <script src=?)
So It looks like that for local developing of react I don't need .ejs but some dependency in index.(html/ejs) are not valid if I have nested URL like localhost:3300/something/id/something
I can't find real purpose of the nested URL problems.
Thx for help 🙏
Hi,
First of all. Thanky you for your job! 🙂
I already spend few hours with unsuccessful configuring of
historyApiFallbackSo I set in
union.config.js:It look that it works well, but problem is that
history-api-fallbackserveindex.htmlas default and notindex.ejsso if i rename
index.ejstoindex.htmlandhistory-api-fallbackstarts to work only for nested path (likelocalhost:3300/a/b) because root still goes toindex.ejsso I added to
union.config.js:Now it looks like that it works but if I go to:
localhost:3300/something/id/somethingit does not render and load any wigets. (maybe some bad relative paths of
<script src=?)So It looks like that for local developing of react I don't need
.ejsbut some dependency inindex.(html/ejs)are not valid if I have nested URL likelocalhost:3300/something/id/somethingI can't find real purpose of the nested URL problems.
Thx for help 🙏