Skip to content

Commit d5f14ce

Browse files
committed
chore: link to compile-time flag reference in docs [ci skip]
1 parent ef90a99 commit d5f14ce

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

packages/vue/README.md

+13-9
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,23 @@
3333

3434
#### Bundler Build Feature Flags
3535

36-
Starting with 3.0.0-rc.3, `esm-bundler` builds now exposes global feature flags that can be overwritten at compile time:
36+
[Detailed Reference on vuejs.org](https://vuejs.org/api/compile-time-flags.html)
3737

38-
- `__VUE_OPTIONS_API__` (enable/disable Options API support, default: `true`)
39-
- `__VUE_PROD_DEVTOOLS__` (enable/disable devtools support in production, default: `false`)
40-
- `__VUE_PROD_HYDRATION_MISMATCH_DETAILS__` (enable/disable detailed warnings for hydration mismatches in production, default: `false`)
38+
`esm-bundler` builds of Vue expose global feature flags that can be overwritten at compile time:
4139

42-
The build will work without configuring these flags, however it is **strongly recommended** to properly configure them in order to get proper tree-shaking in the final bundle. To configure these flags:
40+
- `__VUE_OPTIONS_API__`
41+
- Default: `true`
42+
- Enable / disable Options API support
4343

44-
- webpack: use [DefinePlugin](https://webpack.js.org/plugins/define-plugin/)
45-
- Rollup: use [@rollup/plugin-replace](https://github.com/rollup/plugins/tree/master/packages/replace)
46-
- Vite: configured by default, but can be overwritten using the [`define` option](https://github.com/vitejs/vite/blob/a4133c073e640b17276b2de6e91a6857bdf382e1/src/node/config.ts#L72-L76)
44+
- `__VUE_PROD_DEVTOOLS__`
45+
- Default: `false`
46+
- Enable / disable devtools support in production
4747

48-
Note: the replacement value **must be boolean literals** and cannot be strings, otherwise the bundler/minifier will not be able to properly evaluate the conditions.
48+
- `__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`
49+
- Default: `false`
50+
- Enable / disable detailed warnings for hydration mismatches in production
51+
52+
The build will work without configuring these flags, however it is **strongly recommended** to properly configure them in order to get proper tree-shaking in the final bundle.
4953

5054
### For Server-Side Rendering
5155

0 commit comments

Comments
 (0)