From fff914d103ac550109ce9f134795eb85436c3b48 Mon Sep 17 00:00:00 2001 From: daiwei Date: Mon, 1 Sep 2025 16:27:28 +0800 Subject: [PATCH] chore: update side effect annotations to use standardized format fix the following warning during build (!) packages/runtime-dom/src/apiCustomElement.ts (32:0): A comment "/*! #__NO_SIDE_EFFECTS__ */" in "packages/runtime-dom/src/apiCustomElement.ts" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues. --- packages/runtime-core/src/apiAsyncComponent.ts | 2 +- packages/runtime-core/src/apiDefineComponent.ts | 2 +- packages/runtime-core/src/devtools.ts | 2 +- packages/runtime-dom/src/apiCustomElement.ts | 4 ++-- packages/shared/src/makeMap.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/runtime-core/src/apiAsyncComponent.ts b/packages/runtime-core/src/apiAsyncComponent.ts index ab4ab51b66a..f5ba7781ae8 100644 --- a/packages/runtime-core/src/apiAsyncComponent.ts +++ b/packages/runtime-core/src/apiAsyncComponent.ts @@ -43,7 +43,7 @@ export interface AsyncComponentOptions { export const isAsyncWrapper = (i: ComponentInternalInstance | VNode): boolean => !!(i.type as ComponentOptions).__asyncLoader -/*! #__NO_SIDE_EFFECTS__ */ +/*@__NO_SIDE_EFFECTS__*/ export function defineAsyncComponent< T extends Component = { new (): ComponentPublicInstance }, >(source: AsyncComponentLoader | AsyncComponentOptions): T { diff --git a/packages/runtime-core/src/apiDefineComponent.ts b/packages/runtime-core/src/apiDefineComponent.ts index 2ce870f0141..68155e831a3 100644 --- a/packages/runtime-core/src/apiDefineComponent.ts +++ b/packages/runtime-core/src/apiDefineComponent.ts @@ -301,7 +301,7 @@ export function defineComponent< > // implementation, close to no-op -/*! #__NO_SIDE_EFFECTS__ */ +/*@__NO_SIDE_EFFECTS__*/ export function defineComponent( options: unknown, extraOptions?: ComponentOptions, diff --git a/packages/runtime-core/src/devtools.ts b/packages/runtime-core/src/devtools.ts index 9ac4c433ac1..a904792a234 100644 --- a/packages/runtime-core/src/devtools.ts +++ b/packages/runtime-core/src/devtools.ts @@ -125,7 +125,7 @@ export const devtoolsComponentRemoved = ( type DevtoolsComponentHook = (component: ComponentInternalInstance) => void -/*! #__NO_SIDE_EFFECTS__ */ +/*@__NO_SIDE_EFFECTS__*/ function createDevtoolsComponentHook( hook: DevtoolsHooks, ): DevtoolsComponentHook { diff --git a/packages/runtime-dom/src/apiCustomElement.ts b/packages/runtime-dom/src/apiCustomElement.ts index edf7c431353..cbde44e97e9 100644 --- a/packages/runtime-dom/src/apiCustomElement.ts +++ b/packages/runtime-dom/src/apiCustomElement.ts @@ -163,7 +163,7 @@ export function defineCustomElement< T extends DefineComponent ? P : unknown > -/*! #__NO_SIDE_EFFECTS__ */ +/*@__NO_SIDE_EFFECTS__*/ export function defineCustomElement( options: any, extraOptions?: ComponentOptions, @@ -184,7 +184,7 @@ export function defineCustomElement( return VueCustomElement } -/*! #__NO_SIDE_EFFECTS__ */ +/*@__NO_SIDE_EFFECTS__*/ export const defineSSRCustomElement = (( options: any, extraOptions?: ComponentOptions, diff --git a/packages/shared/src/makeMap.ts b/packages/shared/src/makeMap.ts index e85efe21e5b..d6bb2c35c65 100644 --- a/packages/shared/src/makeMap.ts +++ b/packages/shared/src/makeMap.ts @@ -6,7 +6,7 @@ * So that rollup can tree-shake them if necessary. */ -/*! #__NO_SIDE_EFFECTS__ */ +/*@__NO_SIDE_EFFECTS__*/ export function makeMap(str: string): (key: string) => boolean { const map = Object.create(null) for (const key of str.split(',')) map[key] = 1