Mercurial > hg > ugly-duckling
diff src/bootstrap-feature-extraction-worker.js @ 40:f7244f2155a3
Setup some scaffolding for bootstrapping a worker and loading into a service, providing a mechanism for implementing most of the logic which runs inside the worker in TypeScript.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Thu, 01 Dec 2016 15:46:33 +0000 |
parents | |
children | d3abd81e8ab6 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/bootstrap-feature-extraction-worker.js Thu Dec 01 15:46:33 2016 +0000 @@ -0,0 +1,9 @@ +/** + * Created by lucas on 01/12/2016. + */ +let window = {}; +importScripts('inline.bundle.js'); // provides webpackJsonp +const webpackJsonp = window['webpackJsonp']; +importScripts('scripts.bundle.js'); // needs webpackJsonp, hence above - provides require + +new (require('feature-extraction-worker'))(self);