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

Import not resolved in declaration of exported function #235

Closed
rvolgers opened this issue Feb 18, 2019 · 2 comments · Fixed by #237
Closed

Import not resolved in declaration of exported function #235

rvolgers opened this issue Feb 18, 2019 · 2 comments · Fixed by #237
Assignees
Milestone

Comments

@rvolgers
Copy link

The new Bar() is not resolved / translated. If I remove the export it works.

user@dev:~/somepkg$ cat import.js
import {Foo as Bar} from 'something';

export const fn = ({a = new Bar()}) => a;
user@dev:~/somepkg$ npx swc --no-swcrc import.js
'use strict';
Object.defineProperty(exports, '__esModule', {
    value: true
});
exports.fn = void 0;
var _something = require('something');
var fn = ({ a =new Bar()  })=>a
;
exports.fn = fn;


user@dev:~/somepkg$ npm show @swc/core version
1.0.19
@kdy1 kdy1 added this to the v1.0.19 milestone Feb 19, 2019
@kdy1 kdy1 self-assigned this Feb 19, 2019
kdy1 added a commit to kdy1/swc that referenced this issue Feb 19, 2019
@kdy1 kdy1 mentioned this issue Feb 19, 2019
@kdy1 kdy1 closed this as completed in #237 Feb 19, 2019
kdy1 added a commit that referenced this issue Feb 19, 2019
swc_ecma_transforms:
 - handle pattern correctly in coomon_js pass (#235)
 - fix object rest in arrow expression (#233)
@kdy1
Copy link
Member

kdy1 commented Feb 19, 2019

Fixed with @swc/core 1.0.20

@swc-bot
Copy link
Collaborator

swc-bot commented Oct 30, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants