Skip to content

Commit fb8e83f

Browse files
committed
chore: update link for the feature flag warning [ci skip]
1 parent 7ae07f7 commit fb8e83f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/runtime-core/src/featureFlags.ts

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

packages/vue/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
- Rollup: use [@rollup/plugin-replace](https://github.com/rollup/plugins/tree/master/packages/replace)
4545
- 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)
4646

47+
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+
4749
### For Server-Side Rendering
4850

4951
- **`vue.cjs(.prod).js`**:

0 commit comments

Comments
 (0)