nbb

2022-10-25T01:32:31.536579Z

Is there a way to use from nbb an npm library that uses json modules as described here: https://v8.dev/features/import-assertions? I'm using a library that uses an import statement with a json file, as in that link, and getting

Module "file:///c:/path/to/project/node_modules/library/stuff.json" needs an import assertion of type "json"
I'm not sure if this works in clojurescript proper either, but can't try that out until tomorrow. I suspect it'll be the same error though.

borkdude 2022-10-25T08:29:21.239539Z

Do you have a repro?

borkdude 2022-10-25T08:29:34.398189Z

Like, what library?

2022-10-25T11:42:49.580039Z

Sorry, here's a repro https://gist.github.com/jjttjj/e066cb3d7e30ceace1e894a01c18f185

2022-10-25T11:43:11.044239Z

Basically trying to copy the first steps of this guide here: https://docs.uniswap.org/sdk/guides/quick-start

borkdude 2022-10-25T11:47:02.408129Z

This is the repro with pure JS:

import { Pool } from "@uniswap/v3-sdk";

console.log("hi");
I get a similar error

2022-10-25T11:49:48.347199Z

Ah, must be some problem with the tutorial/libraries. Thanks for checking