Uncaught SyntaxError: Cannot use import statement outside a module

Created on 19 August 2022, almost 2 years ago
Updated 9 February 2024, 5 months ago

When you use the date picker library you get a similar error mentioned in Duet's main github issue queue: https://github.com/duetds/date-picker/issues/105

This can be resolved by adding the "type: module" attribute to the esm js file in the library.

I have tested this and it resolves the issue, however we actually don't need the esm file at all since we're loading the regular JS file as well, so we can split it into 2 libraries: 1 regular one, and 1 esm one.

🐛 Bug report
Status

Fixed

Component

Code

Created by

🇨🇦Canada NickDJM

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024