Skip to content

History api fallback does not handle index.ejs #398

Description

@Svehla

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 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions