Use .mjs extension for ECMAScript modules
See original GitHub issueFeature 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:
- Created 2 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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