+// TODO: https://github.com/webpack-contrib/worker-loader
+// https://stackoverflow.com/questions/48713072/how-to-get-js-function-into-webworker-via-importscripts
// For asynchronous computer move search
onmessage = function(e)
{
{
case "scripts":
self.importScripts(
- '//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js',
- '/javascripts/base_rules.js',
- '/javascripts/utils/array.js',
- '/javascripts/variants/' + e.data[1] + '.js');
- self.V = eval(e.data[1] + "Rules");
+ '@/base_rules.js',
+ '@/utils/array.js',
+ '@/variants/' + e.data[1] + '.js');
+ self.V = eval("VariantRules");
break;
case "init":
const fen = e.data[1];