perf: add `__NO_SIDE_EFFECTS__` comments (#9053)

Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>
This commit is contained in:
chenfan 2024-03-13 21:48:45 +08:00 committed by GitHub
parent a148b87e4b
commit d46df6bdb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 1 deletions

View File

@ -123,6 +123,7 @@ export const devtoolsComponentRemoved = (
}
}
/*! #__NO_SIDE_EFFECTS__ */
function createDevtoolsComponentHook(hook: DevtoolsHooks) {
return (component: ComponentInternalInstance) => {
emit(

View File

@ -17,7 +17,7 @@ import {
} from '@vue/shared'
// leading comma for empty string ""
const shouldIgnoreProp = makeMap(
const shouldIgnoreProp = /*#__PURE__*/ makeMap(
`,key,ref,innerHTML,textContent,ref_key,ref_for`,
)

View File

@ -5,6 +5,8 @@
* \/\*#\_\_PURE\_\_\*\/
* So that rollup can tree-shake them if necessary.
*/
/*! #__NO_SIDE_EFFECTS__ */
export function makeMap(
str: string,
expectsLowerCase?: boolean,