Skip to content
This repository was archived by the owner on Aug 9, 2021. It is now read-only.
This repository was archived by the owner on Aug 9, 2021. It is now read-only.

dynamic imports never resolve, iff you import anything from @nodegui/nodegui in the script doing the importing #34

@valyrie97

Description

@valyrie97

Version information:

node: 16.0.0
qode: 14.17.0
yarn: 1.22.4
npm:  7.10.0

Screen Shot 2021-07-21 at 21 54 13

reproduction steps:

  • set your package.json to have "type": "module"

test.js

import { QMainWindow } from '@nodegui/nodegui';
import('./imported.js').then(console.log).catch(console.log);

imported.js

export const test = 5;

qode test.js

And you will get no output. However, if you remove line 1 from test.js, suddenly everything works as intended. Swapping the order also is seemingly irrelevant, the error persists whether i try to do the dynamic load first or not. Even when attempting to use top level await to force the dynamic import to happen before the static import.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions