Skip to content

Commit d46df6b

Browse files
chenfan0haoqunjiang
andauthoredMar 13, 2024··
perf: add __NO_SIDE_EFFECTS__ comments (#9053)
Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>
1 parent a148b87 commit d46df6b

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed
 

‎packages/runtime-core/src/devtools.ts

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export const devtoolsComponentRemoved = (
123123
}
124124
}
125125

126+
/*! #__NO_SIDE_EFFECTS__ */
126127
function createDevtoolsComponentHook(hook: DevtoolsHooks) {
127128
return (component: ComponentInternalInstance) => {
128129
emit(

‎packages/server-renderer/src/helpers/ssrRenderAttrs.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
} from '@vue/shared'
1818

1919
// leading comma for empty string ""
20-
const shouldIgnoreProp = makeMap(
20+
const shouldIgnoreProp = /*#__PURE__*/ makeMap(
2121
`,key,ref,innerHTML,textContent,ref_key,ref_for`,
2222
)
2323

‎packages/shared/src/makeMap.ts

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* \/\*#\_\_PURE\_\_\*\/
66
* So that rollup can tree-shake them if necessary.
77
*/
8+
9+
/*! #__NO_SIDE_EFFECTS__ */
810
export function makeMap(
911
str: string,
1012
expectsLowerCase?: boolean,

0 commit comments

Comments
 (0)
Please sign in to comment.