refactor: cleanup rollup configuration in examples
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 1 Sep 2023 19:49:32 +0000 (21:49 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 1 Sep 2023 19:49:32 +0000 (21:49 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
examples/typescript/http-server-pool/express-cluster/package.json
examples/typescript/http-server-pool/express-cluster/rollup.config.mjs
examples/typescript/http-server-pool/express-hybrid/package.json
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

index 88a177b7587ad4603b527ba50c5683e240b085be..56c977bcc799373234854949951b4b9de2c30a2f 100644 (file)
@@ -12,7 +12,7 @@
   "scripts": {
     "build": "rollup --config",
     "start": "node dist/main.cjs",
-    "start:esm": "node dist/main.mjs",
+    "start:esm": "node dist/main.js",
     "test": "echo \"Error: no test specified\" && exit 1",
     "benchmark:echo": "autocannon -c 100 -d 30 -p 10 -m POST -H Content-Type=application/json -b '{\"key1\":\"value1\", \"key2\":\"value2\"}' http://localhost:8080/api/echo",
     "benchmark:factorial": "autocannon -c 100 -d 30 -p 10 http://localhost:8080/api/factorial/30"
index 31a3a871b4d342b6690d0c477f6ff020438bde62..913100e3d9ce384241932de9ff39aca4759ca331 100644 (file)
@@ -11,16 +11,12 @@ export default defineConfig({
       format: 'cjs',
       dir: './dist',
       sourcemap: true,
-      entryFileNames: '[name].cjs',
-      preserveModules: true,
-      preserveModulesRoot: './src'
+      entryFileNames: '[name].cjs'
     },
     {
       format: 'esm',
       dir: './dist',
-      sourcemap: true,
-      preserveModules: true,
-      preserveModulesRoot: './src'
+      sourcemap: true
     }
   ],
   external: ['express', 'node:path', 'node:url', 'poolifier'],
index 7863d1ca9e8ba5e05c754444f634c1d0e39dc33c..f37384a428a13a46e28bd75fa9168a6693804b46 100644 (file)
@@ -12,7 +12,7 @@
   "scripts": {
     "build": "rollup --config",
     "start": "node dist/main.cjs",
-    "start:esm": "node dist/main.mjs",
+    "start:esm": "node dist/main.js",
     "test": "echo \"Error: no test specified\" && exit 1",
     "benchmark:echo": "autocannon -c 100 -d 30 -p 10 -m POST -H Content-Type=application/json -b '{\"key1\":\"value1\", \"key2\":\"value2\"}' http://localhost:8080/api/echo",
     "benchmark:factorial": "autocannon -c 100 -d 30 -p 10 http://localhost:8080/api/factorial/30"
index d353be211476f5f8c11c64a1cb95c2835f845beb..87a30fead6e3be4689c74cdec56f4596675fe7ae 100644 (file)
@@ -15,16 +15,12 @@ export default defineConfig({
       format: 'cjs',
       dir: './dist',
       sourcemap: true,
-      entryFileNames: '[name].cjs',
-      preserveModules: true,
-      preserveModulesRoot: './src'
+      entryFileNames: '[name].cjs'
     },
     {
       format: 'esm',
       dir: './dist',
-      sourcemap: true,
-      preserveModules: true,
-      preserveModulesRoot: './src'
+      sourcemap: true
     }
   ],
   external: ['express', 'node:path', 'node:url', 'poolifier'],
index eee200e9eb50a6616ce2f7cbdf97ffabf457f314..1d1f9ac2f8321943d4d6193c837fb7a82f95ebf2 100644 (file)
@@ -11,16 +11,12 @@ export default defineConfig({
       format: 'cjs',
       dir: './dist',
       sourcemap: true,
-      entryFileNames: '[name].cjs',
-      preserveModules: true,
-      preserveModulesRoot: './src'
+      entryFileNames: '[name].cjs'
     },
     {
       format: 'esm',
       dir: './dist',
-      sourcemap: true,
-      preserveModules: true,
-      preserveModulesRoot: './src'
+      sourcemap: true
     }
   ],
   external: ['fastify', 'node:path', 'node:url', 'poolifier'],
index 2ac38f32c587ea36c012fc11f8d2b86b2449541f..0654b9ae5ca87bcc48a5149e0b2e889b540f70e9 100644 (file)
@@ -15,16 +15,12 @@ export default defineConfig({
       format: 'cjs',
       dir: './dist',
       sourcemap: true,
-      entryFileNames: '[name].cjs',
-      preserveModules: true,
-      preserveModulesRoot: './src'
+      entryFileNames: '[name].cjs'
     },
     {
       format: 'esm',
       dir: './dist',
-      sourcemap: true,
-      preserveModules: true,
-      preserveModulesRoot: './src'
+      sourcemap: true
     }
   ],
   external: ['fastify', 'fastify-plugin', 'node:path', 'node:url', 'poolifier'],