Skip to content

Commit 24d9a2d

Browse files
authored
Merge pull request #7493 from QwikDev/v2-reduce-core-size
chore: reduce core production size
2 parents 1c1e311 + 46d3d9f commit 24d9a2d

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

packages/qwik/src/core/shared/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export type QwikLoaderEventScope = '-document' | '-window' | '';
7777
*/
7878
export const DEBUG_TYPE = 'q:type';
7979

80-
export enum VirtualType {
80+
export const enum VirtualType {
8181
Virtual = 'V',
8282
Fragment = 'F',
8383
WrappedSignal = 'S',

packages/qwik/src/core/signal/signal.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* - It needs to store a function which needs to re-run.
1212
* - It is `Readonly` because it is computed.
1313
*/
14+
import { isDev } from '@qwik.dev/core/build';
1415
import { isDomContainer } from '../client/dom-container';
1516
import type { VNode } from '../client/types';
1617
import { pad, qwikDebugToString } from '../debug';
@@ -225,12 +226,16 @@ export class SignalImpl<T = any> implements Signal<T> {
225226
}
226227

227228
toString() {
228-
return (
229-
`[${this.constructor.name}${(this as any).$flags$ & SignalFlags.INVALID ? ' INVALID' : ''} ${String(this.$untrackedValue$)}]` +
230-
(Array.from(this.$effects$ || [])
231-
.map((e) => '\n -> ' + pad(qwikDebugToString(e[0]), ' '))
232-
.join('\n') || '')
233-
);
229+
if (isDev) {
230+
return (
231+
`[${this.constructor.name}${(this as any).$flags$ & SignalFlags.INVALID ? ' INVALID' : ''} ${String(this.$untrackedValue$)}]` +
232+
(Array.from(this.$effects$ || [])
233+
.map((e) => '\n -> ' + pad(qwikDebugToString(e[0]), ' '))
234+
.join('\n') || '')
235+
);
236+
} else {
237+
return this.constructor.name;
238+
}
234239
}
235240
toJSON() {
236241
return { value: this.$untrackedValue$ };

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"outDir": "./dist-dev/tsc-out",
1313
"declarationDir": "./dist-dev/dts-out",
1414
"strict": true,
15-
"verbatimModuleSyntax": true,
1615
"moduleResolution": "Bundler",
1716
"baseUrl": ".",
1817
"assumeChangesOnlyAffectDirectDependencies": true,

0 commit comments

Comments
 (0)