Skip to content

Commit

Permalink
docs: declare the scope of define expressions (#7511)
Browse files Browse the repository at this point in the history
  • Loading branch information
ygj6 committed Mar 29, 2022
1 parent 90df0bb commit 4d55218
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/config/index.md
Expand Up @@ -156,6 +156,8 @@ export default defineConfig(({ command, mode }) => {

- Starting from `2.0.0-beta.70`, string values will be used as raw expressions, so if defining a string constant, it needs to be explicitly quoted (e.g. with `JSON.stringify`).

- To be consistent with [esbuild behavior](https://esbuild.github.io/api/#define), expressions must either be a JSON object (null, boolean, number, string, array, or object) or a single identifier.

- Replacements are performed only when the match is surrounded by word boundaries (`\b`).

::: warning
Expand Down

0 comments on commit 4d55218

Please sign in to comment.