Currently, @fluent packages are published as type: "commonjs". This means that in Node 14, you can only import then as if they were CommonJS modules:
let {FluentBundle} = require("@fluent/bundle");
let bundle = new FluentBundle();
// Or:
let fluent_bundle = require("@fluent/bundle");
let bundle = new fluent_bundle.FluentBundle();
import fluent_bundle from "@fluent/bundle";
let bundle = new fluent_bundle.FluentBundle();
It would be nice to be able to use the following import form, too, just like we can do today in browsers:
import {FluentBundle} from "@fluent/bundle";
let bundle = new FluentBundle();
Currently,
@fluentpackages are published astype: "commonjs". This means that in Node 14, you can only import then as if they were CommonJS modules:It would be nice to be able to use the following import form, too, just like we can do today in browsers: