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 4fabb48 commit 84734acCopy full SHA for 84734ac
src/plugins/ftl/inject.ts
@@ -23,7 +23,10 @@ export function getInjectFtl(options: SFCPluginOptions): InjectFtlFn {
23
const importString = options.parseFtl === true ? '' : '\nimport { FluentResource } from \'@fluent/bundle\'\n'
24
const localeString = locale == null ? '' : locale
25
26
- if (options.parseFtl === true) {
+ if (source.length === 0) {
27
+ magic.append('undefined')
28
+ }
29
+ else if (options.parseFtl === true) {
30
const resource = new FluentResource(normalize(source))
31
magic.overwrite(0, source.length, JSON.stringify(resource))
32
}
0 commit comments