From f13ec4334d2d90d172a437add9bfd2211fd4c582 Mon Sep 17 00:00:00 2001 From: Phil Chen <06fahchen@gmail.com> Date: Tue, 30 Mar 2021 01:18:26 +0800 Subject: [PATCH] fix(plugin-vue): allow to overwrite feature flags (#2675) --- packages/plugin-vue/src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/plugin-vue/src/index.ts b/packages/plugin-vue/src/index.ts index 4d6509ce..0a156f7f 100644 --- a/packages/plugin-vue/src/index.ts +++ b/packages/plugin-vue/src/index.ts @@ -76,11 +76,12 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { return handleHotUpdate(ctx) }, - config() { + config(config) { return { define: { __VUE_OPTIONS_API__: true, - __VUE_PROD_DEVTOOLS__: false + __VUE_PROD_DEVTOOLS__: false, + ...config.define }, ssr: { external: ['vue', '@vue/server-renderer']