Skip to content

Imported function is undefined #5171

@snooopcatt

Description

@snooopcatt

Hello.
I have recently updated from Edge 16 to Edge 17 and now I began to experience issue with imports from momentjs. You can reproduce this issue easily. Assuming you have installed momentjs from npm, create two files:
index.html

<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
    <script src="test.js" type="module"></script>
</body>
</html>

test.js

import { getSetHour } from '../node_modules/moment/src/lib/units/hour.js'

console.log(getSetHour);

This snippet works fine in chrome and edge 16, but fails in edge 17.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions