mongodb-js / boxednode

📦 boxednode – Ship a JS file with Node.js in a box
Apache License 2.0
599 stars 10 forks source link

what about es6? #26

Open vinnitu opened 2 years ago

vinnitu commented 2 years ago

Hello.

What to do if code use es6?

Like this

import { readFileSync } from 'fs';
console.log(JSON.parse(readFileSync('package.json')));
addaleax commented 2 years ago

Right now, the entry point has to be a JS script, but it’s conceivable to add support for ES6 modules here. After the entry point, ES6 modules can be used regardless.