From: Jérôme Benoit Date: Mon, 28 Aug 2023 23:20:17 +0000 (+0200) Subject: build: use defineConfig() in rollup configurations X-Git-Tag: v2.6.38~17 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=5d4b2a88ced1c4a7ec1d5e9a85590de377bdeff0;p=poolifier.git build: use defineConfig() in rollup configurations 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 5bbe0046..31a3a871 100644 --- a/examples/typescript/http-server-pool/express-cluster/rollup.config.mjs +++ b/examples/typescript/http-server-pool/express-cluster/rollup.config.mjs @@ -1,8 +1,9 @@ /* eslint-disable n/no-unpublished-import */ import typescript from '@rollup/plugin-typescript' import del from 'rollup-plugin-delete' +import { defineConfig } from 'rollup' -export default { +export default defineConfig({ input: ['./src/main.ts', './src/worker.ts'], strictDeprecations: true, output: [ @@ -29,4 +30,4 @@ export default { targets: ['./dist/*'] }) ] -} +}) 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 0b07b4e4..d353be21 100644 --- a/examples/typescript/http-server-pool/express-hybrid/rollup.config.mjs +++ b/examples/typescript/http-server-pool/express-hybrid/rollup.config.mjs @@ -1,8 +1,9 @@ /* eslint-disable n/no-unpublished-import */ import typescript from '@rollup/plugin-typescript' import del from 'rollup-plugin-delete' +import { defineConfig } from 'rollup' -export default { +export default defineConfig({ input: [ './src/main.ts', './src/express-worker.ts', @@ -33,4 +34,4 @@ export default { targets: ['./dist/*'] }) ] -} +}) 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 1a46e998..eee200e9 100644 --- a/examples/typescript/http-server-pool/fastify-cluster/rollup.config.mjs +++ b/examples/typescript/http-server-pool/fastify-cluster/rollup.config.mjs @@ -1,8 +1,9 @@ /* eslint-disable n/no-unpublished-import */ import typescript from '@rollup/plugin-typescript' import del from 'rollup-plugin-delete' +import { defineConfig } from 'rollup' -export default { +export default defineConfig({ input: ['./src/main.ts', './src/worker.ts'], strictDeprecations: true, output: [ @@ -29,4 +30,4 @@ export default { targets: ['./dist/*'] }) ] -} +}) 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 ecc218cf..2ac38f32 100644 --- a/examples/typescript/http-server-pool/fastify-hybrid/rollup.config.mjs +++ b/examples/typescript/http-server-pool/fastify-hybrid/rollup.config.mjs @@ -1,8 +1,9 @@ /* eslint-disable n/no-unpublished-import */ import typescript from '@rollup/plugin-typescript' import del from 'rollup-plugin-delete' +import { defineConfig } from 'rollup' -export default { +export default defineConfig({ input: [ './src/main.ts', './src/fastify-worker.ts', @@ -33,4 +34,4 @@ export default { targets: ['./dist/*'] }) ] -} +}) 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 6997381d..c1fe5160 100644 --- a/examples/typescript/websocket-server-pool/ws-cluster/rollup.config.mjs +++ b/examples/typescript/websocket-server-pool/ws-cluster/rollup.config.mjs @@ -1,8 +1,9 @@ /* eslint-disable n/no-unpublished-import */ import typescript from '@rollup/plugin-typescript' import del from 'rollup-plugin-delete' +import { defineConfig } from 'rollup' -export default { +export default defineConfig({ input: ['./src/main.ts', './src/worker.ts'], strictDeprecations: true, output: [ @@ -29,4 +30,4 @@ export default { targets: ['./dist/*'] }) ] -} +}) 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 6f5693b9..1560be0d 100644 --- a/examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.mjs +++ b/examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.mjs @@ -1,8 +1,9 @@ /* eslint-disable n/no-unpublished-import */ import typescript from '@rollup/plugin-typescript' import del from 'rollup-plugin-delete' +import { defineConfig } from 'rollup' -export default { +export default defineConfig({ input: [ './src/main.ts', './src/websocket-server-worker.ts', @@ -33,4 +34,4 @@ export default { targets: ['./dist/*'] }) ] -} +}) diff --git a/rollup.config.mjs b/rollup.config.mjs index e0c97bd6..29cc1f96 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -5,6 +5,7 @@ import typescript from '@rollup/plugin-typescript' import analyze from 'rollup-plugin-analyzer' import command from 'rollup-plugin-command' import del from 'rollup-plugin-delete' +import { defineConfig } from 'rollup' const availableParallelism = () => { let availableParallelism = 1 @@ -25,7 +26,7 @@ const isDocumentationBuild = process.env.DOCUMENTATION const maxWorkers = Math.floor(availableParallelism() / 2) -export default [ +export default defineConfig([ { input: './src/index.ts', strictDeprecations: true, @@ -100,4 +101,4 @@ export default [ isAnalyzeBuild && analyze() ] } -] +]) diff --git a/tsconfig.development.json b/tsconfig.development.json index f7aa7d0f..87915c1e 100644 --- a/tsconfig.development.json +++ b/tsconfig.development.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "sourceMap": true, + "sourceMap": true }, "exclude": ["node_modules", "lib", "examples/typescript/**/*.ts"] }