Skip to content

Commit f58de3a

Browse files
authored
build(vue): warnings from vue about unset flags #5899
## Problem #4463 ## Solution The two required flags are set as follows: - `__VUE_OPTIONS_API__`: `true` since we use the options API extensively. This is opposed to the newer composition API, which I don't believe we use. An example of us using the options API can be found here: https://github.com/aws/aws-toolkit-vscode/blob/f806ae04f5d56b872282e42d5f765b2b1a9e28dd/packages/core/src/login/webview/vue/login.vue#L321 and more info can be found here https://vuejs.org/guide/typescript/options-api - `__VUE_PROD_DEVTOOLS__`: `false` since this is the default, and it otherwise increases the build size per https://vuejs.org/api/compile-time-flags.html#VUE_PROD_DEVTOOLS. ## Notes - Also relevant, composition API: https://vuejs.org/guide/extras/composition-api-faq.html - More detail on the flags: https://vuejs.org/api/compile-time-flags.html#VUE_PROD_DEVTOOLS
1 parent c7325af commit f58de3a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/webpack.base.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ module.exports = (env = {}, argv = {}) => {
101101
new webpack.DefinePlugin({
102102
EXTENSION_VERSION: JSON.stringify(packageJson.version),
103103
}),
104+
new webpack.DefinePlugin({
105+
__VUE_OPTIONS_API__: 'true',
106+
__VUE_PROD_DEVTOOLS__: 'false',
107+
}),
104108
new CircularDependencyPlugin({
105109
exclude: /node_modules|testFixtures/,
106110
failOnError: true,

0 commit comments

Comments
 (0)