Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make setup script compilation respect __VUE_PROD_DEVTOOLS__ #81

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/plugin-vue/src/main.ts
Expand Up @@ -55,7 +55,8 @@ export async function transformMain(

// template
const hasTemplateImport =
descriptor.template && !isUseInlineTemplate(descriptor, !devServer)
descriptor.template &&
!isUseInlineTemplate(descriptor, !devServer && !devToolsEnabled)

let templateCode = ''
let templateMap: RawSourceMap | undefined = undefined
Expand Down
5 changes: 4 additions & 1 deletion packages/plugin-vue/src/script.ts
Expand Up @@ -52,7 +52,10 @@ export function resolveScript(
...options.script,
id: descriptor.id,
isProd: options.isProduction,
inlineTemplate: isUseInlineTemplate(descriptor, !options.devServer),
inlineTemplate: isUseInlineTemplate(
descriptor,
!options.devServer && !options.devToolsEnabled,
),
reactivityTransform: options.reactivityTransform !== false,
templateOptions: resolveTemplateCompilerOptions(descriptor, options, ssr),
sourceMap: options.sourceMap,
Expand Down