dai-shi / svelte3-redux

[NOT MAINTAINED] Redux for Svelte 3
MIT License
30 stars 1 forks source link

import { bindTracked } from 'svelte3-redux' fails #1

Closed drsounds closed 4 years ago

drsounds commented 4 years ago

When doing

import { bindTracked } from 'svelte3-redux'

it gives the error Error: 'bindTracked' is not exported by node_modules/svelte3-redux/dist/index.umd.js

dai-shi commented 4 years ago

Hi! Instead of dist/index.umd.js, you want to use dist/index.esm.js or dist/index.js for es modules or cjs. I presume your bundler config prioritizes "browser" more than "module" or "main" in package.json. I'm not very familiar with the svelte build system, but is this something like a normal environment? Can I easily reproduce the error on my end?

drsounds commented 4 years ago

I resolved it by migrating the whole project to typescript.

dai-shi commented 4 years ago

Cool. Can you close the issue then?