8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b470391 commit 89e7900< 8000 svg aria-hidden="true" focusable="false" class="octicon octicon-copy" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom">Copy full SHA for 89e7900
lib/compileTemplate.ts
@@ -170,10 +170,18 @@ function actuallyCompile(
170
code += `render._withStripped = true`
171
172
if (prettify) {
173
- code = require('prettier').format(code, {
174
- semi: false,
175
- parser: 'babel'
176
- })
+ try {
+ code = require('prettier').format(code, {
+ semi: false,
+ parser: 'babel'
177
+ })
178
+ } catch (e) {
179
+ tips.push(
180
+ `Failed to prettify component ${
181
+ options.filename
182
+ } template source after compilation.`
183
+ )
184
+ }
185
}
186
187
0 commit comments