浏览代码

Make require an external function

This change prevent the following warning when using [webpack](https://webpack.github.io) with haxe generated JavaScript files.

```
WARNING in ./~/microbuilder-js/index.js
Critical dependencies:
6183:8-23 the request of a dependency is an expression
 @ ./~/microbuilder-js/index.js 6183:8-23
```
杨博 (Yang Bo) 9 年之前
父节点
当前提交
c5e36bd5ae
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      std/js/Lib.hx

+ 1 - 1
std/js/Lib.hx

@@ -50,7 +50,7 @@ class Lib {
 		This is only supported in environments where `require` function
 		is available, such as Node.js or RequireJS.
 	**/
-	public static inline function require( module:String ) : Dynamic {
+	@:extern public static inline function require( module:String ) : Dynamic {
 		return untyped __js__("require")(module);
 	}