chore: update link for the feature flag warning [ci skip]

This commit is contained in:
Evan You 2020-07-21 10:24:51 -04:00
parent 7ae07f718d
commit fb8e83f0c2
2 changed files with 5 additions and 5 deletions

View File

@ -23,11 +23,9 @@ export function initFeatureFlags() {
if (__DEV__ && needWarn) { if (__DEV__ && needWarn) {
console.warn( console.warn(
`You are running the esm-bundler build of Vue. It is recommended to ` + `You are running the esm-bundler build of Vue. It is recommended to ` +
`configure your bundler to explicitly replace the following global ` + `configure your bundler to explicitly replace feature flag globals ` +
`variables with boolean literals so that it can remove unnecessary code:\n\n` + `with boolean literals to get proper tree-shaking in the final bundle. ` +
`- __VUE_OPTIONS_API__ (support for Options API, default: true)\n` + `See http://link.vuejs.org/feature-flags for more details.`
`- __VUE_PROD_DEVTOOLS__ (enable devtools inspection in production, default: false)`
// TODO link to docs
) )
} }
} }

View File

@ -44,6 +44,8 @@
- Rollup: use [@rollup/plugin-replace](https://github.com/rollup/plugins/tree/master/packages/replace) - 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) - 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)
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.
### For Server-Side Rendering ### For Server-Side Rendering
- **`vue.cjs(.prod).js`**: - **`vue.cjs(.prod).js`**: