Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit 166c061

Browse files
posvaznck
authored andcommitted
🐛 Compile vue files without a template (#48)
Do not try to compile the template of a vue file if it doesn't exist. This may hapen in Vue files using pure render functions
1 parent 1b0f1ef commit 166c061

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vueTransform.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function processScript (source, id, content, options, nodes) {
122122
const script = deIndent(padContent(content.slice(0, content.indexOf(source.code))) + source.code)
123123
const map = (new MagicString(script)).generateMap({ hires: true })
124124

125-
if (options.compileTemplate) {
125+
if (template && options.compileTemplate) {
126126
const render = require('vue-template-compiler').compile(template)
127127

128128
return { map, code: injectRender(script, render, lang, options) }

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy