Skip to content

Commit

Permalink
fix(plugin-vue): don't inline ts scripts during build
Browse files Browse the repository at this point in the history
  • Loading branch information
jods4 committed Apr 26, 2022
1 parent 3edd1af commit 2e90f68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-vue/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ async function genScriptCode(
if (script) {
// If the script is js/ts and has no external src, it can be directly placed
// in the main module.
if ((!script.lang || script.lang === 'ts') && !script.src) {
if ((!script.lang || (script.lang === 'ts' && options.devServer)) && !script.src) {
scriptCode = options.compiler.rewriteDefault(
script.content,
'_sfc_main',
Expand Down

0 comments on commit 2e90f68

Please sign in to comment.