8000 feat: pass fs option · Threebow/vue-loader@893d208 · GitHub
[go: up one dir, main page]

Skip to content

Commit 893d208

Browse files
committed
feat: pass fs option
1 parent 98d95ee commit 893d208

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ export interface VueLoaderOptions {
4747
appendExtension?: boolean
4848

4949
isServerBuild?: boolean
50+
51+
fs?: {
52+
fileExists(file: string): boolean
53+
readFile(file: string): string | undefined
54+
realpath?(file: string): string
55+
}
5056
}
5157

5258
let errorEmitted = false

src/resolveScript.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export function resolveScript(
6666
compilerOptions: options.compilerOptions,
6767
transformAssetUrls: options.transformAssetUrls || true,
6868
},
69+
fs: options.fs
6970
})
7071
} catch (e) {
7172
loaderContext.emitError(e)

0 commit comments

Comments
 (0)
0