Build a project with nuxt and report an error under ie9

report an error under ie9

[nuxt] the Error while initializing app TypeError: object does not support the "replaceState" property or method
so that subsequent operations cannot be completed under ie

Aug.16,2021

this is due to the fact that the default route pattern of nuxt is history, which is problematic in ie9. You need to add
if (process.client) {
window.history.replaceState = window.history.replaceState | | function () {}
} to solve


. After I change router.js, run dev it will automatically revert to its previous appearance. The added code disappears


Hello. Have you solved your problem? I also encounter the same problem, please guide

Menu