script-utils/bundlers/esbuild-impl/change-extension-plugin
This module defines an esbuild plugin that changes the extension of JavaScript files after the build process.
Functions
Section titled “Functions”| Function | Description |
|---|---|
| changeExtensionPlugin | Creates an esbuild plugin that changes the extension of JavaScript files after the build process. |
| rewriteImportPathExtensions | Rewrites the extension of every import-like path in an emitted module’s text from .ts to the target output extension (.mjs / .cjs), so the multi-file dist/lib build references its real siblings. Covers require('…'), static from "…", and dynamic import("…") occurrences. |