mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-10 15:04:03 +09:00
js modules now have 'mjs' extension
This commit is contained in:
@@ -615,8 +615,8 @@ require = function(path) {
|
|||||||
else {
|
else {
|
||||||
// if the path starts with ".", look for the current directory
|
// 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 the path starts with [A-Za-z0-9], look for the DOSDIR/includes
|
||||||
if (path[0] == '.') return shell.require(shell.resolvePathInput(path).full + ".js")
|
if (path[0] == '.') return shell.require(shell.resolvePathInput(path).full + ".mjs")
|
||||||
else return shell.require(`A:${_TVDOS.variables.DOSDIR}/include/${path}.js`)
|
else return shell.require(`A:${_TVDOS.variables.DOSDIR}/include/${path}.mjs`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user