Skip to content

Commit 54924f0

Browse files
committed
Do not emit lualib bundle when bundling
1 parent 2308ebf commit 54924f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Emit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function emitTranspiledFiles(
1616
emitHost: EmitHost = ts.sys
1717
): OutputFile[] {
1818
const options = program.getCompilerOptions();
19-
let { outDir, luaLibImport } = options;
19+
let { outDir, luaLibImport, luaBundle } = options;
2020

2121
const rootDir = program.getCommonSourceDirectory();
2222
outDir = outDir || rootDir;
@@ -48,7 +48,7 @@ export function emitTranspiledFiles(
4848
}
4949
}
5050

51-
if (luaLibImport === LuaLibImportKind.Require || luaLibImport === LuaLibImportKind.Always) {
51+
if (!luaBundle && (luaLibImport === LuaLibImportKind.Require || luaLibImport === LuaLibImportKind.Always)) {
5252
if (lualibContent === undefined) {
5353
const lualibBundle = emitHost.readFile(path.resolve(__dirname, "../dist/lualib/lualib_bundle.lua"));
5454
if (lualibBundle !== undefined) {

0 commit comments

Comments
 (0)