history
history copied to clipboard
Using the history package in any form causes Svelte apps to die with "uncaught reference error"
In my svelte app I have tried all forms of imports from the History package, but they always make the app die with
Uncaught ReferenceError: process is not defined
at browser.js:1
at main.js:3
I have tried importing the package both ways:
import history from 'history/browser';
import { createBrowserHistory } from 'history';
Neither works. Any idea what might be causing this?
In my svelte app I have tried all forms of imports from the History package, but they always make the app die with
Uncaught ReferenceError: process is not defined at browser.js:1 at main.js:3
I have tried importing the package both ways:
import history from 'history/browser'; import { createBrowserHistory } from 'history';
Neither works. Any idea what might be causing this?
type=module will not set global varible,
window.history = createBrowserHistory()
will work