Open
Description
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:
- From other cjs files:
let {FluentBundle} = require("@fluent/bundle");
let bundle = new FluentBundle();
// Or:
let fluent_bundle = require("@fluent/bundle");
let bundle = new fluent_bundle.FluentBundle();
- From mjs files:
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();