summaryrefslogtreecommitdiff
path: root/src/linit.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/linit.js')
-rw-r--r--src/linit.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linit.js b/src/linit.js
index 6cc48b1..4139f20 100644
--- a/src/linit.js
+++ b/src/linit.js
@@ -9,7 +9,6 @@ const lstrlib = require('./lstrlib.js');
const ltablib = require('./ltablib.js');
const lutf8lib = require('./lutf8lib.js');
const ldblib = require('./ldblib.js');
-const liolib = require('./liolib.js');
const loslib = require('./loslib.js');
const loadlib = require('./loadlib.js');
const lualib = require('./lualib.js');
@@ -19,7 +18,6 @@ const loadedlibs = {
[lualib.LUA_COLIBNAME]: lcorolib.luaopen_coroutine,
[lualib.LUA_DBLIBNAME]: ldblib.luaopen_debug,
[lualib.LUA_MATHLIBNAME]: lmathlib.luaopen_math,
- [lualib.LUA_IOLIBNAME]: liolib.luaopen_io,
[lualib.LUA_OSLIBNAME]: loslib.luaopen_os,
[lualib.LUA_STRLIBNAME]: lstrlib.luaopen_string,
[lualib.LUA_TABLIBNAME]: ltablib.luaopen_table,
@@ -27,6 +25,8 @@ const loadedlibs = {
"_G": lbaselib.luaopen_base
};
+if (!WEB) loadedlibs[lualib.LUA_IOLIBNAME] = require('./liolib.js').luaopen_io;
+
const luaL_openlibs = function(L) {
/* "require" functions from 'loadedlibs' and set results to global table */
for (let lib in loadedlibs) {