option to generate an es module instead of commonjs module
See original GitHub issueIssue type
Feature Request:
Description
When pegjs produces an output .js file, it is in common js format:
module.exports = {
SyntaxError: peg$SyntaxError,
parse: peg$parse
};
I want the output as an es module instead:
export { peg$parse as parse, peg$SyntaxError as SyntaxError };
Issue Analytics
- State:
- Created 2 years ago
- Comments:12
Top Results From Across the Web
CommonJS vs. ES modules in Node.js - LogRocket Blog
ES modules are the standard for JavaScript, while CommonJS is the default in Node. js. The ES module format was created to standardize...
Read more >CommonJS vs ES Modules in Node.js - A Detailed Comparison
CommonJS modules are a popular way to modularize JavaScript code. They allow you to export and import modules using the export and import ......
Read more >CommonJS vs. ES Modules: Modules and Imports in NodeJS
We are going to have a look into CommonJS and ES Modules. ... Here we import the http module in order to create...
Read more >Upgrade your Node app: From CommonJS to ES Modules
Step by step: From CommonJS to ES Modules · 1) Prepare your code · 2) Update the package.json · 3) Convert all imports...
Read more >NodeJS — Using ES Modules Instead of CommonJS
Make your own project folder to start using ES Modules in your code, name whatever you want, go inside that folder, and start...
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 Free
Top 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

Yes, it’s resolved in Peggy. We’re working toward a first release within days, I hope.
Same, I’m migragted to peggy!