File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,28 @@ const compilePlugins = [
3131// So, here we continue to use the '.mjs' extension to indicate newer ECMASCRIPT support
3232// but ensure the code can be run within a worker by putting it inside a named iife.
3333const ESModules = [
34+ {
35+ input : 'output/worker-thread/server-lib.js' ,
36+ output : {
37+ file : 'dist/server-lib.mjs' ,
38+ format : 'es' ,
39+ name : 'ServerLib' ,
40+ sourcemap : true ,
41+ } ,
42+ plugins : [
43+ replace ( {
44+ values : {
45+ WORKER_DOM_DEBUG : false ,
46+ } ,
47+ preventAssignment : true ,
48+ } ) ,
49+ babelPlugin ( {
50+ transpileToES5 : false ,
51+ allowConsole : false ,
52+ } ) ,
53+ ...compilePlugins ,
54+ ] ,
55+ } ,
3456 {
3557 input : 'output/worker-thread/index.js' ,
3658 output : {
Original file line number Diff line number Diff line change 1+ import { Document } from './dom/Document' ;
2+ import { GlobalScope } from './WorkerDOMGlobalScope' ;
3+
4+ export function createDocument ( ) {
5+ const win : GlobalScope = { } as any ;
6+ return new Document ( win ) ;
7+ }
You can’t perform that action at this time.
0 commit comments