Board Thread:Lua Help/@comment-3134670-20160316163541/@comment-24473195-20160316175607

I would advise against doing it like that. The reason they disabled loadstring and "dofile" is exactly to prevent stuff like that (and also for security reasons). Wikitext is meant to be simple.

Instead put your files in a data module, and invoke them using either mw.loadData or require as described in Lua templating/Reference manual/Scribunto libraries. See Module:Country and Module:Country/data for examples.