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 e4b8de2 commit a625c40Copy full SHA for a625c40
src/index.ts
@@ -3,6 +3,8 @@ import * as path from "path";
3
import * as fs from 'fs';
4
import * as crypto from "crypto";
5
6
+import ts from "typescript";
7
+
8
import * as sfc from '@vue/compiler-sfc';
9
import * as core from '@vue/compiler-core';
10
@@ -136,7 +138,7 @@ const vuePlugin = (opts: Options = {}) => <esbuild.Plugin>{
136
138
const { descriptor } = sfc.parse(source, {
137
139
filename
140
});
- const script = (descriptor.script || descriptor.scriptSetup) ? sfc.compileScript(descriptor, { id }) : undefined;
141
+ const script = (descriptor.script || descriptor.scriptSetup) ? sfc.compileScript(descriptor, { id, fs: ts.sys }) : undefined;
142
143
const dataId = "data-v-" + id;
144
let code = "";
0 commit comments