dai-shi / proxy-memoize

Intuitive magical memoization library with Proxy and WeakMap

Home Page:http://proxy-memoize.js.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sourcemaps not set up correctly?

markerikson opened this issue · comments

I'm trying to debug #10 , but I don't see any indication of the proxy-memoize source showing up in the Chrome DevTools. I can't find any filenames with proxy-memoize in the path, and if I try to put a breakpoint right before the memoize() call and step into it, the DevTools debugger steps into random lines of the RTK source before ending up back in the app code.

This is using reduxjs/redux-fundamentals-example-app@f270ea1 , which is built with react-scripts@3.4.3.

Just wondering if somehow the sourcemaps aren't built/defined correctly.

On the other hand, loading https://codesandbox.io/s/proxy-memoize-demo-c1021 into Chrome, I see the proxy-memoize files under node_modules just fine. So, this could also be a build environment issue somehow.

I'm wondering if this is a clash between RTK's sourcemaps and PM's sourcemaps somehow. Both point to a '../src/index.ts' file as one of their sources, and trying to step into memoize() is specifically showing RTK's src/index.ts instead.

It's using microbundle to build. I'm not sure what to do...

Yeah, I saw that.

I can't figure out if this is an RTK thing, PM thing, CRA thing, or something else.

If this issue isn't super critical, I will consider to make this library v1.0.0.

Closing as nothing actionable. Can reopen if someone has a suggestion.