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

Commit 2b33850

Browse files
committed
fix: return code instead of null in transform hook for plugin inheritability, closes #172
1 parent 6976ca8 commit 2b33850

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/compiler/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function analyzeCode(code: string, filename: string, options: AnalyzeOpti
3737
* one of the above is false, return null
3838
*/
3939
if (!isAcceptableLang(filename) || !enableAnalyze(options) || hitPaths(filename, excludePaths))
40-
return null
40+
return code
4141

4242
let locations: InsertLocation[] | null = null
4343

@@ -52,7 +52,7 @@ export function analyzeCode(code: string, filename: string, options: AnalyzeOpti
5252
}
5353

5454
if (!locations || !locations.length)
55-
return null
55+
return code
5656

5757
let ms = new MagicString(code)
5858

0 commit comments

Comments
 (0)