Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:refer is still destructuring on the object that wraps default #577

Closed
yogthos opened this issue Nov 18, 2024 · 0 comments
Closed

:refer is still destructuring on the object that wraps default #577

yogthos opened this issue Nov 18, 2024 · 0 comments

Comments

@yogthos
Copy link
Contributor

yogthos commented Nov 18, 2024

version

0.8.123

problem

require doesn't end up resolving correctly when using both $default and :refer

without refer

$ npx squint --show -e '(ns foo (:require ["pg$default" :as pg])) (js/console.log pg.Pool)'
import * as squint_core from 'squint-cljs/core.js';
import pg from 'pg';
console.log(pg.Pool);

[class BoundPool extends Pool]

with refer

$ npx squint --show -e '(ns foo (:require ["pg$default" :as pg :refer [Pool]])) (js/console.log Pool)'
import * as squint_core from 'squint-cljs/core.js';
import pg from 'pg';
import { Pool } from 'pg';
console.log(Pool);

file:///private/tmp/dude/.tmp4ras1Q/squint.mjs:3
import { Pool } from 'pg';
borkdude added a commit that referenced this issue Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant