refactor: fix rollup configuration in examples
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sat, 2 Sep 2023 10:20:10 +0000 (12:20 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sat, 2 Sep 2023 10:20:10 +0000 (12:20 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
examples/typescript/http-server-pool/express-cluster/rollup.config.mjs
examples/typescript/http-server-pool/express-hybrid/rollup.config.mjs
examples/typescript/http-server-pool/fastify-cluster/rollup.config.mjs
examples/typescript/http-server-pool/fastify-hybrid/rollup.config.mjs
examples/typescript/websocket-server-pool/ws-cluster/rollup.config.mjs
examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.mjs
rollup.config.mjs

index 913100e3d9ce384241932de9ff39aca4759ca331..86ad2c86c77ec499dab1b0edfc53a12cb628e5e8 100644 (file)
@@ -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',
index 87a30fead6e3be4689c74cdec56f4596675fe7ae..13f6b37dd6c27cdfee7f1a7be3b347b1caa18ad7 100644 (file)
@@ -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',
index 1d1f9ac2f8321943d4d6193c837fb7a82f95ebf2..2c07a12fde3a7ae87e9ccda92ab90fd57d25d7a5 100644 (file)
@@ -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',
index 0654b9ae5ca87bcc48a5149e0b2e889b540f70e9..a8c4e473cb7cc3772685a2f6314a773e9d0eba4b 100644 (file)
@@ -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',
index c1fe5160375b028d7a555d3f98540fac37e0e838..2633843c443309e1e12cff7a8151b7e5c6b47f9a 100644 (file)
@@ -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'],
index 1560be0d5fac7fa855a6d534dbfee3179038d90c..3aa319270489473c6ad34b4b4074dda55ef60601 100644 (file)
@@ -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'],
index 29cc1f96e86610346dc42757afe07c73fae0b560..9e8cd65bb0317152141a539de08f8d64c16a2c6c 100644 (file)
@@ -50,6 +50,7 @@ export default defineConfig([
           dir: './lib',
           sourcemap: true,
           entryFileNames: '[name].mjs',
+          chunkFileNames: '[name]-[hash].mjs',
           preserveModules: true,
           preserveModulesRoot: './src'
         }),