Under the TP5 framework, how to remove-sharp from the front-end VUE?

when developing with native PHP, just add the following lines of code directly to the configuration document

location / {
    try_files $uri $uri/ /index.html;
}

now after changing to TP5, adding the above lines of code will not work. Has any boss ever encountered this problem? Help me out, thank you

Jun.01,2022

if-sharp in url
set index.js to mode in the front-end routing configuration file: 'history'

export default new Router({
    mode: 'history',//history
    routes: ---
})

-sharp refers to router's hashMode ? If so, it would be fine to use historyMode directly, but the server needs to configure the parsing path of index.html.

Menu