js modules now have 'mjs' extension

This commit is contained in:
minjaesong
2025-01-29 11:19:59 +09:00
parent 98cf06f519
commit a72279c86c
7 changed files with 2 additions and 2 deletions

View File

@@ -615,8 +615,8 @@ require = function(path) {
else {
// if the path starts with ".", look for the current directory
// if the path starts with [A-Za-z0-9], look for the DOSDIR/includes
if (path[0] == '.') return shell.require(shell.resolvePathInput(path).full + ".js")
else return shell.require(`A:${_TVDOS.variables.DOSDIR}/include/${path}.js`)
if (path[0] == '.') return shell.require(shell.resolvePathInput(path).full + ".mjs")
else return shell.require(`A:${_TVDOS.variables.DOSDIR}/include/${path}.mjs`)
}
}