]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: link to compile-time flag reference in docs [ci skip]
authorEvan You <yyx990803@gmail.com>
Wed, 27 Dec 2023 05:08:44 +0000 (13:08 +0800)
committerEvan You <yyx990803@gmail.com>
Wed, 27 Dec 2023 05:08:44 +0000 (13:08 +0800)
packages/vue/README.md

index c41162cc1c64a09d4cca9086d6ca0de501dc3e9b..2aca524e03d360b33101e1880f2c96f91efb0dcf 100644 (file)
 
 #### Bundler Build Feature Flags
 
-Starting with 3.0.0-rc.3, `esm-bundler` builds now exposes global feature flags that can be overwritten at compile time:
+[Detailed Reference on vuejs.org](https://vuejs.org/api/compile-time-flags.html)
 
-- `__VUE_OPTIONS_API__` (enable/disable Options API support, default: `true`)
-- `__VUE_PROD_DEVTOOLS__` (enable/disable devtools support in production, default: `false`)
-- `__VUE_PROD_HYDRATION_MISMATCH_DETAILS__` (enable/disable detailed warnings for hydration mismatches in production, default: `false`)
+`esm-bundler` builds of Vue expose global feature flags that can be overwritten at compile time:
 
-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:
+- `__VUE_OPTIONS_API__`
+  - Default: `true`
+  - Enable / disable Options API support
 
-- webpack: use [DefinePlugin](https://webpack.js.org/plugins/define-plugin/)
-- Rollup: use [@rollup/plugin-replace](https://github.com/rollup/plugins/tree/master/packages/replace)
-- 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)
+- `__VUE_PROD_DEVTOOLS__`
+  - Default: `false`
+  - Enable / disable devtools support in production
 
-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.
+- `__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`
+  - Default: `false`
+  - Enable / disable detailed warnings for hydration mismatches in production
+
+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.
 
 ### For Server-Side Rendering