diff options
Diffstat (limited to 'src/lualib.js')
-rw-r--r-- | src/lualib.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lualib.js b/src/lualib.js index 549ab28..ed02273 100644 --- a/src/lualib.js +++ b/src/lualib.js @@ -14,9 +14,11 @@ const LUA_TABLIBNAME = "table"; module.exports.LUA_TABLIBNAME = LUA_TABLIBNAME; module.exports[LUA_TABLIBNAME] = require("./ltablib.js").luaopen_table; -const LUA_IOLIBNAME = "io"; -module.exports.LUA_IOLIBNAME = LUA_IOLIBNAME; -module.exports[LUA_IOLIBNAME] = require("./liolib.js").luaopen_io; +if (!WEB) { + const LUA_IOLIBNAME = "io"; + module.exports.LUA_IOLIBNAME = LUA_IOLIBNAME; + module.exports[LUA_IOLIBNAME] = require("./liolib.js").luaopen_io; +} const LUA_OSLIBNAME = "os"; module.exports.LUA_OSLIBNAME = LUA_OSLIBNAME; |