Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/esm #104

Merged
merged 6 commits into from
Feb 1, 2024
Merged

Feat/esm #104

merged 6 commits into from
Feb 1, 2024

Conversation

Tommytrg
Copy link
Member

@Tommytrg Tommytrg commented Jan 29, 2024

Close #103

@guidiaz
Copy link

guidiaz commented Jan 30, 2024

.github/workflows/ci.yaml needs upgrading node version to 20

@Tommytrg Tommytrg force-pushed the feat/esm branch 4 times, most recently from 74fdccf to 4f93f4d Compare February 1, 2024 17:39
src/i18n.ts Outdated
import en from './locales/en.json'
import es from './locales/es.json'
import en from "./locales/en.json" assert { type: "json" };
import es from "./locales/es.json" assert { type: "json" };
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import JSON this other way, as to avoid CLI tools using witnet-radon-js to stream out "(node:12542) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time" into STDERR:

import { createRequire } from "module";
const require = createRequire(import.meta.url);
const en = require("./locales/en.json");
const es = require("./locales/es.json");

@Tommytrg Tommytrg force-pushed the feat/esm branch 2 times, most recently from 25f7363 to a825cb7 Compare February 1, 2024 18:02
@Tommytrg Tommytrg merged commit f694495 into witnet:master Feb 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add compatibility with ESM
2 participants