Closed dicknetherlands closed 1 year ago
Some investigation, yes it looks like our source maps are pointing at src
files rather than the dist file with the appropriate line-numbers 😅 https://www.runpkg.com/?urql@3.0.4/dist/urql.js.map#1 then again the same is present in 3.0.3 though https://www.runpkg.com/?urql@3.0.3/dist/urql.js.map#1 but the paths in 3.0.4 are wrong.
This might be caused by the move from the typescript-2 to typescript rollup plugin
Funnily enough, I believe this problem is solved by actually removing @rollup/plugin-typescript
and only relying on @rollup/plugin-sucrase
for stripping TypeScript types from the bundled source.
I wanted to do something similar anyway, however, it's probably best to do several things while we're fixing this:
@rollup/plugin-sucrase
is sufficiently stable for this task, and check whether we'd like to use an alternative instead (I believe there are several transformers that could be better)@rollup/plugin-typescript
and @rollup/plugin-sucrase
with something else entirely (back to rollup-plugin-typescript2
?) since rollup-plugin-dts
is sufficient for generating the declarations@urql/core
they actually seem to be empty?)Lastly, we may want to insert a lint rule for some JS features that we'd like to not transpile or even use, e.g. currently optional properties rely on a polyfill in TypeScript that can't be disabled (?) and we typically don't use them as they bloat when transpiled anyway. However, the Optional chaining operator is indeed in our support range, so they wouldn't have to be transpiled.
Describe the bug
I'm getting the following warnings from NPM when running a React app that has urql has a dependency. There's actually 10x warnings relating to 10 different sources, all of which have identical warning message format:
The project compiles and runs fine. The 10 files that get mentioned in these 10 warning messages are:
Here's my package.json that produces the issue. NPM is 8.19.2. Node is 18.12.1.
It can be triggered simply by importing urql as shown below in any of my project components and running
npm start
:The issue has only arisen in urql@3.0.4. Rolling back to urql@3.0.3 resolves it.
Reproduction
Literally any code that imports urql@3.0.4 as described
Urql version
urql@3.0.4
Validations