UNPKG

esbuild-fix-imports-plugin

Version:

An ESBuild plugin that fixes import paths by applying fixAliasPlugin, fixFolderImportsPlugin, and fixExtensionsPlugin. It ensures correct file extensions, resolves path aliases, and fixes directory imports in your build output when using 'tsup' with 'bund

85 lines (84 loc) 2.54 kB
{ "name": "esbuild-fix-imports-plugin", "version": "1.0.21", "description": "An ESBuild plugin that fixes import paths by applying fixAliasPlugin, fixFolderImportsPlugin, and fixExtensionsPlugin. It ensures correct file extensions, resolves path aliases, and fixes directory imports in your build output when using 'tsup' with 'bundle: false'. Includes comprehensive tests for all plugin features including alias resolution, folder imports, extension handling, and nested module imports.", "scripts": { "build": "pnpm build:package & pnpm build:types", "build:package": "tsup", "build:types": "tsc --project ./tsconfig.types.json && tsc-alias --project ./tsconfig.types.json", "clean": "rimraf ./dist", "test": "cd ./test && pnpm build && node ./dist/esm/index.mjs && node ./dist/cjs/index.cjs", "test:baseurl": "cd ./test-baseurl && pnpm build && node ./dist/esm/index.mjs && node ./dist/cjs/index.cjs" }, "private": false, "keywords": [ "esbuild", "plugin", "imports", "fix", "alias", "extensions", "folder-imports", "typescript", "tsup", "bundle-false", "import-paths", "path-aliases", "module-resolution" ], "license": "ISC", "homepage": "https://github.com/aymericzip/esbuild-fix-imports-plugin", "bugs": { "url": "https://github.com/aymericzip/esbuild-fix-imports-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/aymericzip/esbuild-fix-imports-plugin.git" }, "author": { "name": "Aymeric PINEAU", "url": "https://github.com/aymericzip" }, "contributors": [ { "name": "Aymeric Pineau", "email": "ay.pineau@gmail.com", "url": "https://github.com/aymericzip" } ], "type": "module", "exports": { ".": { "types": "./dist/types/index.d.ts", "require": "./dist/cjs/index.cjs", "import": "./dist/esm/index.mjs" }, "./package.json": "./package.json" }, "types": "dist/types/index.d.ts", "main": "dist/cjs/index.cjs", "module": "dist/esm/index.mjs", "typesVersions": { "*": { "package.json": [ "./package.json" ] } }, "sideEffects": false, "files": [ "./dist", "./package.json" ], "devDependencies": { "@types/node": "^22.8.1", "esbuild": "^0.24.0", "load-tsconfig": "^0.2.5", "tsc-alias": "^1.8.10", "tsup": "^8.3.5", "typescript": "^5.6.3" }, "bug": { "url": "https://github.com/aymericzip/esbuild-fix-imports-plugin/issues" } }