{"id":16057387,"url":"https://github.com/aduth/esbuild-esm-loader","last_synced_at":"2025-03-17T21:31:11.336Z","repository":{"id":57227312,"uuid":"347401532","full_name":"aduth/esbuild-esm-loader","owner":"aduth","description":"ESM loader to transform imports using ESBuild","archived":false,"fork":false,"pushed_at":"2025-01-02T19:07:03.000Z","size":792,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-13T22:35:06.365Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aduth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-13T15:06:24.000Z","updated_at":"2025-01-02T19:07:01.000Z","dependencies_parsed_at":"2024-06-22T14:36:56.525Z","dependency_job_id":"499937e4-3de1-45aa-bbfb-44fcecc77abf","html_url":"https://github.com/aduth/esbuild-esm-loader","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"32fb70f031277263db3fb05b200b3d07beb47eb8"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aduth%2Fesbuild-esm-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aduth%2Fesbuild-esm-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aduth%2Fesbuild-esm-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aduth%2Fesbuild-esm-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aduth","download_url":"https://codeload.github.com/aduth/esbuild-esm-loader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243885933,"owners_count":20363644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T03:02:08.562Z","updated_at":"2025-03-17T21:31:11.331Z","avatar_url":"https://github.com/aduth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESBuild ESM Loader\n\n**ESBuild ESM Loader** is a custom resolver implementation for the [module customization hooks](https://nodejs.org/docs/latest/api/module.html#customization-hooks) feature of Node.js ECMAScript modules.\n\nUsing this loader will enhance the default loader behavior to allow you to transform imported files using [ESBuild](https://esbuild.github.io/), allowing for transparent imports of modern JavaScript, JSX, and TypeScript.\n\n```tsx\n// index.tsx\nimport React from 'react';\nimport { renderToStaticMarkup } from 'react-dom/server';\n\nconsole.log(renderToStaticMarkup(\u003cdiv\u003eHello World!\u003c/div\u003e));\n```\n\n```\nnode --import=esbuild-esm-loader/register ./index.tsx\n```\n\n## Installation\n\nThe current version of the library requires **Node.js v16.17 or newer**.\n\nInstall as a dependency using `npm`. You will also need to install ESBuild, as it's a peer dependency of this project.\n\n```\nnpm install esbuild esbuild-esm-loader\n```\n\n## Usage\n\nLoaders can be defined as an argument when running `node`.\n\n```\nnode --import=esbuild-esm-loader/register entry.js\n```\n\nFor better error stack traces, this loader supports [Node.js's native sourcemap support](https://nodejs.org/api/module.html#source-map-v3-support), which can be enabled by passing the `--enable-source-maps` flag.\n\n```\nnode --enable-source-maps --import=esbuild-esm-loader/register entry.js\n```\n\n## Configuration\n\nIf present, a `tsconfig.json` will be read and provided to ESBuild as the [`tsconfigRaw` option](https://esbuild.github.io/api/#tsconfig-raw). You can use this to control behavior such as JSX pragma with TypeScript's [`jsxFactory` configuration option](https://www.typescriptlang.org/tsconfig#jsxFactory). This applies even if you are not using TypeScript.\n\n## Versioning\n\nThis project follows [Semantic Versioning](https://semver.org/).\n\nTo better align with the experimental status of the loader hooks, initial releases will follow major version zero until the feature stabilizes in Node.js. Minor versions on the zero major will always include breaking changes. Patch versions on the zero major will include bug fixes and backwards-compatible changes.\n\nVersioning will proceed from 1.0.0 once the feature stabilizes in Node.js.\n\n## License\n\nCopyright 2025 Andrew Duthie\n\nReleased under the MIT License. See [LICENSE.md](./LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faduth%2Fesbuild-esm-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faduth%2Fesbuild-esm-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faduth%2Fesbuild-esm-loader/lists"}