From: Jérôme Benoit Date: Sun, 5 Nov 2023 11:56:06 +0000 (+0100) Subject: build: use regex for external in rollup config X-Git-Tag: v3.0.6~43 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=fcdc962c5bb68f641bbfd74281c8c3eafabc6bad;p=poolifier.git build: use regex for external in rollup config Signed-off-by: Jérôme Benoit --- diff --git a/examples/typescript/http-server-pool/express-cluster/rollup.config.ts b/examples/typescript/http-server-pool/express-cluster/rollup.config.ts index ac0da326..1ce8d77b 100644 --- a/examples/typescript/http-server-pool/express-cluster/rollup.config.ts +++ b/examples/typescript/http-server-pool/express-cluster/rollup.config.ts @@ -19,7 +19,7 @@ export default defineConfig({ sourcemap: true } ], - external: ['express', 'node:path', 'node:url', 'poolifier'], + external: ['express', /node:*/, 'poolifier'], plugins: [ typescript(), del({ diff --git a/examples/typescript/http-server-pool/express-hybrid/rollup.config.ts b/examples/typescript/http-server-pool/express-hybrid/rollup.config.ts index 9337c580..50b6abd6 100644 --- a/examples/typescript/http-server-pool/express-hybrid/rollup.config.ts +++ b/examples/typescript/http-server-pool/express-hybrid/rollup.config.ts @@ -23,7 +23,7 @@ export default defineConfig({ sourcemap: true } ], - external: ['express', 'node:path', 'node:url', 'poolifier'], + external: ['express', /node:*/, 'poolifier'], plugins: [ typescript(), del({ diff --git a/examples/typescript/http-server-pool/fastify-cluster/rollup.config.ts b/examples/typescript/http-server-pool/fastify-cluster/rollup.config.ts index ee04284f..50653c74 100644 --- a/examples/typescript/http-server-pool/fastify-cluster/rollup.config.ts +++ b/examples/typescript/http-server-pool/fastify-cluster/rollup.config.ts @@ -19,7 +19,7 @@ export default defineConfig({ sourcemap: true } ], - external: ['fastify', 'node:path', 'node:url', 'poolifier'], + external: ['fastify', /node:*/, 'poolifier'], plugins: [ typescript(), del({ diff --git a/examples/typescript/http-server-pool/fastify-hybrid/rollup.config.ts b/examples/typescript/http-server-pool/fastify-hybrid/rollup.config.ts index 293d69fc..4b3e4e63 100644 --- a/examples/typescript/http-server-pool/fastify-hybrid/rollup.config.ts +++ b/examples/typescript/http-server-pool/fastify-hybrid/rollup.config.ts @@ -23,7 +23,7 @@ export default defineConfig({ sourcemap: true } ], - external: ['fastify', 'fastify-plugin', 'node:path', 'node:url', 'poolifier'], + external: ['fastify', 'fastify-plugin', /node:*/, 'poolifier'], plugins: [ typescript(), del({ diff --git a/examples/typescript/websocket-server-pool/ws-cluster/rollup.config.ts b/examples/typescript/websocket-server-pool/ws-cluster/rollup.config.ts index ff47feed..19e44313 100644 --- a/examples/typescript/websocket-server-pool/ws-cluster/rollup.config.ts +++ b/examples/typescript/websocket-server-pool/ws-cluster/rollup.config.ts @@ -19,7 +19,7 @@ export default defineConfig({ sourcemap: true } ], - external: ['node:path', 'node:url', 'poolifier', 'ws'], + external: [/node:*/, 'poolifier', 'ws'], plugins: [ typescript(), del({ diff --git a/examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.ts b/examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.ts index 6d2fc34d..d4d28a19 100644 --- a/examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.ts +++ b/examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.ts @@ -23,7 +23,7 @@ export default defineConfig({ sourcemap: true } ], - external: ['node:path', 'node:url', 'poolifier', 'ws'], + external: [/node:*/, 'poolifier', 'ws'], plugins: [ typescript(), del({ diff --git a/rollup.config.mjs b/rollup.config.mjs index b7abc9c5..1eca9997 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -66,16 +66,7 @@ export default defineConfig([ }) } ], - external: [ - 'node:async_hooks', - 'node:cluster', - 'node:crypto', - 'node:events', - 'node:fs', - 'node:os', - 'node:perf_hooks', - 'node:worker_threads' - ], + external: [/node:*/], plugins: [ typescript({ tsconfig: './tsconfig.build.json', @@ -93,13 +84,7 @@ export default defineConfig([ { input: './lib/dts/index.d.ts', output: [{ format: 'esm', file: './lib/index.d.ts' }], - external: [ - 'node:async_hooks', - 'node:cluster', - 'node:events', - 'node:perf_hooks', - 'node:worker_threads' - ], + external: [/node:*/], plugins: [ dts(), del({