Skip to content

Commit 9326aed

Browse files
committed
Externalize openfl.js in starling.js file
1 parent a9f04c8 commit 9326aed

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

webpack.common.js

+14-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,18 @@ module.exports = {
1212
alias: {
1313
"openfl": path.resolve (__dirname, "node_modules/openfl/lib/openfl")
1414
}
15-
}
15+
},
16+
externals: [
17+
function (context, request, callback) {
18+
if (/^openfl\//.test (request)) {
19+
return callback (null, {
20+
amd: request,
21+
root: request.split ("/"),
22+
commonjs: request,
23+
commonjs2: request
24+
});
25+
}
26+
callback ();
27+
}
28+
]
1629
};

0 commit comments

Comments
 (0)