タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

CommonJSとarticleとmoduleに関するefclのブックマーク (3)

  • require(esm) in Node.js

    Recently I landed experimental support for require()-ing synchronous ES modules in Node.js, a feature that has been long overdue. In the pull request, I commented with my understanding about why it did not happen sooner before this pull request in 2024. This post expands on that comment a bit more. The opinions in this post are my own and reflect my perception of the ESM development in Node.js as

    efcl
    efcl 2024/03/19
    Node.jsに実装された`--experimental-require-module`で、CommonJSからESMを`require`できる仕組みについて。 Top-Level awaitの非同期をスコープ外にすることで実装が進んだ
  • CommonJS is not going away | Bun Blog

    Bun.Terminal API, compile-time feature flags, improved Bun.stringWidth accuracy, V8 C++ value type checking APIs, Content-Disposition support fo... URLPattern API, Fake Timers for bun:test, Custom Proxy Headers in fetch(),console.log %j format, http.Agent connection pooling fix, Standalone e...

    efcl
    efcl 2023/07/03
    BunがCommonJSをサポートするのはなぜかについて。 CommonJSとECMAScript Moduleを比べると同期と非同期の違いがあるため起動時のロード時間が異なることや、すでに多くのCommonJSモジュールがあるため
  • Ship ESM & CJS in one Package

    [[toc]] ESM & CJS ESM - ECMAScript modules CJS - CommonJS In the past decade, due to the lack of a standard module system of JavaScript, CommonJS (a.k.a the require('xxx') and module.exports syntax) has been the way how Node.js and NPM packages work. Until 2015, when ECMAScript modules finally show up as the standard solution, the community start migrating to native ESM gradually. // CJS const cir

    Ship ESM & CJS in one Package
    efcl
    efcl 2021/11/30
    CommonJSとESMのデュアルフォーマットでのパッケージ公開について。 `package.json`の`exports`フィールドでの使い分け、tsupとunbuildのビルドについて。 ESMでは利用できないCommonJSの`__dirname`などの補完方法について
  • 1