update example-link in description
ivanhofer opened this issue · 3 comments
ivanhofer commented
davidrunger commented
This link points to a repl with an older version of
devalue
That REPL link (https://svelte.dev/repl/138d70def7a748ce9eda736ef1c71239?version=3.49.0) seems to me to use the latest version of devalue
(currently 4.0.1), but the import fails with this error:
'devalue' is not exported by https://unpkg.com/devalue@4.0.1/index.js, imported by ./App.svelte
As you @ivanhofer noted/hinted, this error can be fixed by changing the import
in the REPL example from
import { devalue } from 'devalue';
to
import * as devalue from 'devalue';
(as the README.md exemplifies.)
davidrunger commented
After changing the import
statement, although that fixes the import
error, the example still doesn't work as expected. It fails with this error:
devalue is not a function (dataundefined)
One must also change
devalue(data)
in the demo code to
devalue.uneval(data)
to see devalue
actually working.
Rich-Harris commented
fixed, thanks!