Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

History api fallback does not handle index.ejs #398

Open
Svehla opened this issue Jun 30, 2019 · 0 comments
Open

History api fallback does not handle index.ejs #398

Svehla opened this issue Jun 30, 2019 · 0 comments

Comments

@Svehla
Copy link

Svehla commented Jun 30, 2019

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 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant