Open jmarkyston opened 7 months ago
Can you confirm you're setting "type": "module"
in your package.json
?
It wasn't set, but it is now. I updated my webpack config to support that. Sadly, I'm getting the same error. I tried removing node_modules and package.lock and running npm i again just in case, but that didn't help.
I really love the quality of life this package brings.
I'm trying to use this in a typescript setting, so rather than a
routes.js
file, I've added aroutes.ts
file, which looks like this:When I import and attempt to use
wrap()
, I get thePackage path ./wrap is not exported from package svelte-spa-router
error.My tsconfig has
allowJs
andallowSyntheticDefaultImports
turned on, but this error still exists. I've also tried importing it like `import * as wrap from 'svelte-spa-router/wrap', but I get the same error.I see a ts type definition for the wrap file. Do you know why this isn't working for me?