X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=rollup.config.mjs;h=e0c97bd6e4ebe607ec56d4c526c43206a6215393;hb=0b60de1faea2ed2ebbbf77393ab4d280b7a897a2;hp=b1386fbdd0dea8c352c0dad28b9dac9e309be252;hpb=dcbe4226bec6b3eab0fc327bde2c37d0e7effba6;p=poolifier.git diff --git a/rollup.config.mjs b/rollup.config.mjs index b1386fbd..e0c97bd6 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -27,33 +27,33 @@ const maxWorkers = Math.floor(availableParallelism() / 2) export default [ { - input: 'src/index.ts', + input: './src/index.ts', strictDeprecations: true, output: [ { format: 'cjs', ...(isDevelopmentBuild && { - dir: 'lib', + dir: './lib', sourcemap: true, preserveModules: true, - preserveModulesRoot: 'src' + preserveModulesRoot: './src' }), ...(!isDevelopmentBuild && { - file: 'lib/index.js', + file: './lib/index.js', plugins: [terser({ maxWorkers })] }) }, { format: 'esm', ...(isDevelopmentBuild && { - dir: 'lib', + dir: './lib', sourcemap: true, entryFileNames: '[name].mjs', preserveModules: true, - preserveModulesRoot: 'src' + preserveModulesRoot: './src' }), ...(!isDevelopmentBuild && { - file: 'lib/index.mjs', + file: './lib/index.mjs', plugins: [terser({ maxWorkers })] }) } @@ -71,11 +71,11 @@ export default [ plugins: [ typescript({ tsconfig: isDevelopmentBuild - ? 'tsconfig.development.json' - : 'tsconfig.production.json' + ? './tsconfig.development.json' + : './tsconfig.production.json' }), del({ - targets: ['lib/*'] + targets: ['./lib/*'] }), isAnalyzeBuild && analyze(), isDocumentationBuild && command('pnpm typedoc') @@ -83,7 +83,7 @@ export default [ }, { input: './lib/dts/index.d.ts', - output: [{ format: 'esm', file: 'lib/index.d.ts' }], + output: [{ format: 'esm', file: './lib/index.d.ts' }], external: [ 'node:async_hooks', 'node:cluster', @@ -94,7 +94,7 @@ export default [ plugins: [ dts(), del({ - targets: ['lib/dts'], + targets: ['./lib/dts'], hook: 'buildEnd' }), isAnalyzeBuild && analyze()