diff --git a/pom.xml b/pom.xml
index 6c82e12..c8cd7aa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
pw.yumc
MiaoScript
- 1.1.2
+ 1.1.3
502647092
diff --git a/src/main/resources/core/require.js b/src/main/resources/core/require.js
index 7bc463b..88c2468 100644
--- a/src/main/resources/core/require.js
+++ b/src/main/resources/core/require.js
@@ -89,7 +89,7 @@
if (optional.hook) {
origin = optional.hook(origin);
}
- base.save(cacheFile, "(function (module, exports, require, __DIR__, __FILE__) {" + origin + "});");
+ base.save(cacheFile, "(function (module, exports, require, __dirname, __filename) {" + origin + "});");
// 使用 load 可以保留行号和文件名称
var obj = load(cacheFile);
base.delete(cacheFile);
@@ -149,7 +149,7 @@
* @private
*/
function _require(name, path, optional) {
- var file = resolve(name, path);
+ var file = _canonical(name) ? name : resolve(name, path);
if (file === undefined) {
log.console("§c模块 §a%s §c加载失败! §4未找到该模块!", name);
return {exports:{}};