]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: update link for the feature flag warning [ci skip]
authorEvan You <yyx990803@gmail.com>
Tue, 21 Jul 2020 14:24:51 +0000 (10:24 -0400)
committerEvan You <yyx990803@gmail.com>
Tue, 21 Jul 2020 14:26:16 +0000 (10:26 -0400)
packages/runtime-core/src/featureFlags.ts
packages/vue/README.md

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