Skip to content

Commit 43881d7

Browse files
committed
fix: replace zoneless property, inferring zone.js polyfill presence instead
1 parent bfbf87e commit 43881d7

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

e2e/fixtures/rspack-zoneless-csr-css/rspack.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ module.exports = () => {
44
return createConfig(
55
{
66
options: {
7-
zoneless: true,
87
root: __dirname,
98
index: './src/index.html',
109
assets: [

packages/angular-rspack/src/lib/models/angular-rspack-plugin-options.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,6 @@ export interface AngularRspackPluginOptions {
343343
* The tsconfig file for web workers.
344344
*/
345345
webWorkerTsConfig?: string;
346-
/**
347-
* Enables zoneless mode; relevant for SSR prerendering.
348-
*/
349-
zoneless?: boolean;
350346
}
351347

352348
export interface NormalizedAngularRspackPluginOptions

packages/angular-rspack/src/lib/models/normalize-options.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ export async function normalizeOptions(
216216
type: budget.type as any,
217217
}));
218218

219+
const zoneless = options.polyfills
220+
? !options.polyfills.includes('zone.js')
221+
: true;
222+
219223
return {
220224
advancedOptimizations,
221225
appShell: options.appShell ?? false,
@@ -265,7 +269,7 @@ export async function normalizeOptions(
265269
vendorChunk: options.vendorChunk ?? false,
266270
verbose: options.verbose ?? false,
267271
watch: options.watch ?? false,
268-
zoneless: options.zoneless ?? false,
272+
zoneless,
269273
};
270274
}
271275

0 commit comments

Comments
 (0)