Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/markups/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import analyze from 'rollup-plugin-analyzer';
import dts from 'rollup-plugin-dts';

const PRODUCTION = process.env.NODE_ENV === 'production';
const TERSER_OPTIONS = { numWorkers: 1 };
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: numWorkers: 1 is applied unconditionally, which may slow down production builds on non-Windows platforms too. If the instability is Windows-specific, consider making this conditional (e.g., only on process.platform === 'win32') or configurable via an environment variable so CI/macOS/Linux can keep parallel minification.

Suggested change
const TERSER_OPTIONS = { numWorkers: 1 };
const TERSER_NUM_WORKERS =
process.env.TERSER_NUM_WORKERS &&
parseInt(process.env.TERSER_NUM_WORKERS, 10);
const TERSER_OPTIONS =
Number.isInteger(TERSER_NUM_WORKERS) && TERSER_NUM_WORKERS > 0
? { numWorkers: TERSER_NUM_WORKERS }
: process.platform === 'win32'
? { numWorkers: 1 }
: {};

Copilot uses AI. Check for mistakes.

export default [
{
Expand All @@ -21,7 +22,7 @@ export default [
sourcemap: 'hidden',
preserveModules: true,
preserveModulesRoot: 'src',
plugins: [PRODUCTION && terser()],
plugins: [PRODUCTION && terser(TERSER_OPTIONS)],
exports: 'auto',
},

Expand All @@ -31,7 +32,7 @@ export default [
sourcemap: 'hidden',
preserveModules: true,
preserveModulesRoot: 'src',
plugins: [PRODUCTION && terser()],
plugins: [PRODUCTION && terser(TERSER_OPTIONS)],
},
],
external: [
Expand Down
5 changes: 3 additions & 2 deletions packages/react/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import analyze from 'rollup-plugin-analyzer';

const packageJson = require('./package.json');
const PRODUCTION = process.env.NODE_ENV === 'production';
const TERSER_OPTIONS = { numWorkers: 1 };
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: numWorkers: 1 is applied unconditionally, which may slow down production builds on non-Windows platforms too. If the instability is Windows-specific, consider making this conditional (e.g., only on process.platform === 'win32') or configurable via an environment variable so CI/macOS/Linux can keep parallel minification.

Suggested change
const TERSER_OPTIONS = { numWorkers: 1 };
const TERSER_NUM_WORKERS = process.env.TERSER_NUM_WORKERS;
const TERSER_OPTIONS =
TERSER_NUM_WORKERS != null && TERSER_NUM_WORKERS !== ''
? { numWorkers: Number(TERSER_NUM_WORKERS) }
: process.platform === 'win32'
? { numWorkers: 1 }
: {};

Copilot uses AI. Check for mistakes.

export default [
{
Expand All @@ -20,13 +21,13 @@ export default [
file: packageJson.main,
format: 'cjs',
sourcemap: true,
plugins: [PRODUCTION && terser()],
plugins: [PRODUCTION && terser(TERSER_OPTIONS)],
},
{
file: packageJson.module,
format: 'esm',
sourcemap: true,
plugins: [PRODUCTION && terser()],
plugins: [PRODUCTION && terser(TERSER_OPTIONS)],
},
],
external: [
Expand Down
5 changes: 3 additions & 2 deletions packages/ui-elements/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import analyze from 'rollup-plugin-analyzer';
import dts from 'rollup-plugin-dts';

const PRODUCTION = process.env.NODE_ENV === 'production';
const TERSER_OPTIONS = { numWorkers: 1 };
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: numWorkers: 1 is applied unconditionally, which may slow down production builds on non-Windows platforms too. If the instability is Windows-specific, consider making this conditional (e.g., only on process.platform === 'win32') or configurable via an environment variable so CI/macOS/Linux can keep parallel minification.

Suggested change
const TERSER_OPTIONS = { numWorkers: 1 };
const TERSER_OPTIONS =
process.platform === 'win32' ? { numWorkers: 1 } : {};

Copilot uses AI. Check for mistakes.

export default [
{
Expand All @@ -21,7 +22,7 @@ export default [
sourcemap: 'hidden',
preserveModules: true,
preserveModulesRoot: 'src',
plugins: [PRODUCTION && terser()],
plugins: [PRODUCTION && terser(TERSER_OPTIONS)],
exports: 'auto',
},

Expand All @@ -31,7 +32,7 @@ export default [
sourcemap: 'hidden',
preserveModules: true,
preserveModulesRoot: 'src',
plugins: [PRODUCTION && terser()],
plugins: [PRODUCTION && terser(TERSER_OPTIONS)],
},
],
external: ['react', 'react-dom', '@emotion/react'],
Expand Down
5 changes: 3 additions & 2 deletions packages/ui-kit/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import analyze from 'rollup-plugin-analyzer';
import dts from 'rollup-plugin-dts';

const PRODUCTION = process.env.NODE_ENV === 'production';
const TERSER_OPTIONS = { numWorkers: 1 };
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: numWorkers: 1 is applied unconditionally, which may slow down production builds on non-Windows platforms too. If the instability is Windows-specific, consider making this conditional (e.g., only on process.platform === 'win32') or configurable via an environment variable so CI/macOS/Linux can keep parallel minification.

Suggested change
const TERSER_OPTIONS = { numWorkers: 1 };
const TERSER_NUM_WORKERS_ENV = process.env.TERSER_NUM_WORKERS;
const TERSER_NUM_WORKERS =
TERSER_NUM_WORKERS_ENV && !Number.isNaN(Number(TERSER_NUM_WORKERS_ENV))
? Number(TERSER_NUM_WORKERS_ENV)
: process.platform === 'win32'
? 1
: undefined;
const TERSER_OPTIONS = TERSER_NUM_WORKERS
? { numWorkers: TERSER_NUM_WORKERS }
: {};

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I kept this unconditional intentionally to prioritize build stability and keep the change minimal.
Happy to make it platform-specific or configurable if that’s preferred by maintainers.


export default [
{
Expand All @@ -21,7 +22,7 @@ export default [
sourcemap: 'hidden',
preserveModules: true,
preserveModulesRoot: 'src',
plugins: [PRODUCTION && terser()],
plugins: [PRODUCTION && terser(TERSER_OPTIONS)],
exports: 'auto',
},

Expand All @@ -31,7 +32,7 @@ export default [
sourcemap: 'hidden',
preserveModules: true,
preserveModulesRoot: 'src',
plugins: [PRODUCTION && terser()],
plugins: [PRODUCTION && terser(TERSER_OPTIONS)],
},
],
external: [
Expand Down
Loading