question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use .mjs extension for ECMAScript modules

See original GitHub issue

Feature description

I propose that Popper should use the .mjs extension for built ES modules.

Why should this feature be part of the Popper’s core?

This feature should be part of popper’s core because native Node ES imports only work on .mjs extensions, and give an Uncaught SyntaxError if you try importing a normal js file.

I personally am using Nuxt 3, which uses native ES Modules (see more here). I have no way of easily using Popper without manually renaming Popper’s built files.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
FezVrastacommented, Nov 10, 2021

I think cutting a new major just to refresh the whole distribution targets system to be up to date with the recent trends would make sense.

1reaction
atomikscommented, Dec 9, 2021

Hi, we’re closing all feature requests related to Popper as it is entering low maintenance mode. All feature requests should now relate to the new package, Floating UI!

Floating UI is an ES module by default now

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use MJS files in Node.js? - DEV Community ‍ ‍
1. Create a ES Module / MJS File · 2. Import your code · 3. Set your package type to "module".
Read more >
Files with .mjs extension for JavaScript modules - Medium
mjs is the extension for EcmaScript module files. Node.js or webpack are already handling them and we better know what it means before...
Read more >
ECMAScript modules | Node.js v19.3.0 Documentation
Authors can tell Node.js to use the ECMAScript modules loader via the .mjs file extension, the package.json "type" field, or the --input-type flag....
Read more >
MJS - Node.js ES Module Javascript File
A file with .mjs extension is a JavaScript source code file that is used as an ECMA Module (ECMAScript Module) in Node.js applications....
Read more >
What is the difference between .js and .mjs files?
mjs an extension for EcmaScript modules · An MJS file is a source code file containing an ES Module (ECMAScript Module) for use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found