File tree 2 files changed +29
-0
lines changed
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,28 @@ const compilePlugins = [
31
31
// So, here we continue to use the '.mjs' extension to indicate newer ECMASCRIPT support
32
32
// but ensure the code can be run within a worker by putting it inside a named iife.
33
33
const 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
+ } ,
34
56
{
35
57
input : 'output/worker-thread/index.js' ,
36
58
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