esbuild-plugin-node-externals
Advanced tools
Comparing version
# CHANGELOG | ||
## Developing 1.0.0(2022-11-16) | ||
## Released 1.0.1 | ||
- BugFix: Update build configuration for better CJS & ESM compat support. | ||
## Released 1.0.0 | ||
- No significant changes. | ||
- CHORE: Both CJS and ESM output will be published now, as with `exports` field in packages.json, you will be using the ESM version by `import`, and CJS version by `require`. |
{ | ||
"name": "esbuild-plugin-node-externals", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "ESBuild plugin for node externals.", | ||
@@ -24,4 +24,4 @@ "keywords": [ | ||
".": { | ||
"import": "./dist/esm/index.js", | ||
"require": "./dist/index.js", | ||
"import": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts" | ||
@@ -37,12 +37,7 @@ } | ||
}, | ||
"tsup": { | ||
"entry": "src/index.ts", | ||
"splitting": false, | ||
"sourcemap": false, | ||
"clean": true | ||
"scripts": { | ||
"dev": "tsup src/index.ts --watch --dts --format esm", | ||
"build": "rm -rf dist && tsup src/index.ts --config ../../tsup.config.ts" | ||
}, | ||
"scripts": { | ||
"dev": "tsup src/index.ts --watch --dts --format esm --legacy-output", | ||
"build": "rm -rf dist && tsup src/index.ts --dts --format esm,cjs --legacy-output" | ||
} | ||
"readme": "# esbuild-plugin-node-externals\n\nESBuild plugin for node externals handing.\n\n- [Author](https://github.com/linbudu599)\n- [GitHub Repo](https://github.com/LinbuduLab/esbuild-plugins/tree/master/packages/esbuild-plugin-node-externals#readme)\n- [Changelog](https://github.com/LinbuduLab/esbuild-plugins/blob/main/packages/esbuild-plugin-node-externals/CHANGELOG.md)\n\n## Usage\n\n```bash\nnpm install esbuild-plugin-node-externals --save-dev\npnpm install esbuild-plugin-node-externals --save-dev\nyarn add esbuild-plugin-node-externals --save-dev\n```\n\n```typescript\nimport { build } from 'esbuild';\nimport { nodeExternals } from 'esbuild-plugin-node-externals';\n\n(async () => {\n const res = await build({\n entryPoints: ['.src/main.ts'],\n bundle: true,\n outfile: './dist/main.js',\n plugins: [\n nodeExternals({\n packagePaths: 'package.json',\n include: ['SOME_PKG_YOU_WANT_TO_INCLUDE_AT_BUNDLE'],\n }),\n ],\n });\n})();\n```\n\n## Configurations\n\n```typescript\nexport interface NodeExternalsOptions {\n /**\n * list of package.json paths to read from\n * if not specified, will read from cwd\n */\n packagePaths: string | string[];\n\n /**\n * mark all dependencies as external\n * @default true\n */\n withDeps: boolean;\n\n /**\n * mark all devDependencies as external\n * @default true\n */\n withDevDeps: boolean;\n\n /**\n * mark all peerDependencies as external\n * @default true\n */\n withPeerDeps: boolean;\n\n /**\n * mark all optionalDependencies as external\n * @default true\n */\n withOptDeps: boolean;\n\n /**\n * list of packages to exclude from externalization\n */\n include: string[];\n}\n```\n" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
16485
11.32%0
-100%