From: Jérôme Benoit Date: Sat, 2 Sep 2023 10:20:10 +0000 (+0200) Subject: refactor: fix rollup configuration in examples X-Git-Tag: v2.6.41~11 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=efaeaba6fd711155c0e628ef10a456c1b543ba78;p=poolifier.git refactor: fix rollup configuration in examples Signed-off-by: Jérôme Benoit --- diff --git a/examples/typescript/http-server-pool/express-cluster/rollup.config.mjs b/examples/typescript/http-server-pool/express-cluster/rollup.config.mjs index 913100e3..86ad2c86 100644 --- a/examples/typescript/http-server-pool/express-cluster/rollup.config.mjs +++ b/examples/typescript/http-server-pool/express-cluster/rollup.config.mjs @@ -11,7 +11,8 @@ export default defineConfig({ format: 'cjs', dir: './dist', sourcemap: true, - entryFileNames: '[name].cjs' + entryFileNames: '[name].cjs', + chunkFileNames: '[name]-[hash].cjs' }, { format: 'esm', diff --git a/examples/typescript/http-server-pool/express-hybrid/rollup.config.mjs b/examples/typescript/http-server-pool/express-hybrid/rollup.config.mjs index 87a30fea..13f6b37d 100644 --- a/examples/typescript/http-server-pool/express-hybrid/rollup.config.mjs +++ b/examples/typescript/http-server-pool/express-hybrid/rollup.config.mjs @@ -15,7 +15,8 @@ export default defineConfig({ format: 'cjs', dir: './dist', sourcemap: true, - entryFileNames: '[name].cjs' + entryFileNames: '[name].cjs', + chunkFileNames: '[name]-[hash].cjs' }, { format: 'esm', diff --git a/examples/typescript/http-server-pool/fastify-cluster/rollup.config.mjs b/examples/typescript/http-server-pool/fastify-cluster/rollup.config.mjs index 1d1f9ac2..2c07a12f 100644 --- a/examples/typescript/http-server-pool/fastify-cluster/rollup.config.mjs +++ b/examples/typescript/http-server-pool/fastify-cluster/rollup.config.mjs @@ -11,7 +11,8 @@ export default defineConfig({ format: 'cjs', dir: './dist', sourcemap: true, - entryFileNames: '[name].cjs' + entryFileNames: '[name].cjs', + chunkFileNames: '[name]-[hash].cjs' }, { format: 'esm', diff --git a/examples/typescript/http-server-pool/fastify-hybrid/rollup.config.mjs b/examples/typescript/http-server-pool/fastify-hybrid/rollup.config.mjs index 0654b9ae..a8c4e473 100644 --- a/examples/typescript/http-server-pool/fastify-hybrid/rollup.config.mjs +++ b/examples/typescript/http-server-pool/fastify-hybrid/rollup.config.mjs @@ -15,7 +15,8 @@ export default defineConfig({ format: 'cjs', dir: './dist', sourcemap: true, - entryFileNames: '[name].cjs' + entryFileNames: '[name].cjs', + chunkFileNames: '[name]-[hash].cjs' }, { format: 'esm', diff --git a/examples/typescript/websocket-server-pool/ws-cluster/rollup.config.mjs b/examples/typescript/websocket-server-pool/ws-cluster/rollup.config.mjs index c1fe5160..2633843c 100644 --- a/examples/typescript/websocket-server-pool/ws-cluster/rollup.config.mjs +++ b/examples/typescript/websocket-server-pool/ws-cluster/rollup.config.mjs @@ -12,15 +12,12 @@ export default defineConfig({ dir: './dist', sourcemap: true, entryFileNames: '[name].cjs', - preserveModules: true, - preserveModulesRoot: './src' + chunkFileNames: '[name]-[hash].cjs' }, { format: 'esm', dir: './dist', - sourcemap: true, - preserveModules: true, - preserveModulesRoot: './src' + sourcemap: true } ], external: ['node:path', 'node:url', 'poolifier', 'ws'], diff --git a/examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.mjs b/examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.mjs index 1560be0d..3aa31927 100644 --- a/examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.mjs +++ b/examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.mjs @@ -16,15 +16,12 @@ export default defineConfig({ dir: './dist', sourcemap: true, entryFileNames: '[name].cjs', - preserveModules: true, - preserveModulesRoot: './src' + chunkFileNames: '[name]-[hash].cjs' }, { format: 'esm', dir: './dist', - sourcemap: true, - preserveModules: true, - preserveModulesRoot: './src' + sourcemap: true } ], external: ['node:path', 'node:url', 'poolifier', 'ws'], diff --git a/rollup.config.mjs b/rollup.config.mjs index 29cc1f96..9e8cd65b 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -50,6 +50,7 @@ export default defineConfig([ dir: './lib', sourcemap: true, entryFileNames: '[name].mjs', + chunkFileNames: '[name]-[hash].mjs', preserveModules: true, preserveModulesRoot: './src' }),