---
title: preEntry
configName: source.preEntry
---

# source.preEntry

- **Type:** `string | string[]`
- **Default:** `[]`

Add a script before the entry file of each page. This script will be executed before the page code. It can be used to execute global logics, such as injecting polyfills, setting global styles, etc.

import RsbuildConig from '@site-docs-en/components/rsbuild-config-tooltip';

<RsbuildConig />
