Skip to content

Error when importing same file twice in the same module #730

@marvinhagemeister

Description

@marvinhagemeister

Reported via Slack:

after migrating to 3.3.1 i noticed interesting issue that in development if i import one same file twice, it will not properly include the file second time (not sure if its related to alias). Just throwing it here as an observation, i’ll provide more details later maybe. No biggie

Yeah, so if I have something like import {a, b} from 'aliased/file.js' and then split it into import {a} from 'aliased/file.js'; import {b} from 'aliased/file.js;' the second time file will be served as html. In HMR I get Failed to fetch dynamically imported module:
I couldn’t reproduce it with importing from npm, i think it may be related to aliasing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions