File tree 4 files changed +40
-0
lines changed
4 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 83
83
if : steps.cache-build.outputs.cache-hit != 'true'
84
84
run : yarn build:all
85
85
86
+ - run : yarn workspace @dd/tests build_esbuild || ls -la packages/tests/src/_playwright/projects/dist
86
87
- run : yarn workspace @dd/tests e2e || ls -la packages/tests/src/_playwright/projects/dist
87
88
88
89
- name : Save playwright cache
Original file line number Diff line number Diff line change 19
19
},
20
20
"scripts" : {
21
21
"build" : " yarn clean && tsc" ,
22
+ "build_esbuild" : " ts-node -T --project ../tools/tsconfig.json ./src/buildEsbuild.ts" ,
22
23
"clean" : " rm -rf dist" ,
23
24
"e2e" : " FORCE_COLOR=true playwright test" ,
24
25
"test" : " FORCE_COLOR=true JEST_CONFIG_TRANSPILE_ONLY=true VITE_CJS_IGNORE_WARNING=true NODE_OPTIONS=\" --openssl-legacy-provider --experimental-vm-modules ${NODE_OPTIONS:-}\" jest" ,
57
58
"nock" : " 14.0.0-beta.7" ,
58
59
"rollup" : " 4.24.2" ,
59
60
"strip-ansi" : " 6.0.1" ,
61
+ "ts-node" : " 10.9.2" ,
60
62
"typescript" : " 5.4.3" ,
61
63
"vite" : " 5.4.10" ,
62
64
"webpack" : " 5.92.1" ,
Original file line number Diff line number Diff line change
1
+ import type { Options } from '@dd/core/types' ;
2
+ import { configEsbuild } from '@dd/tools/bundlers' ;
3
+ import { debugFilesPlugins } from '@dd/tools/helpers' ;
4
+ import { getEsbuildPlugin } from '@dd/tools/plugins' ;
5
+ import * as esbuild from 'esbuild' ;
6
+ import path from 'path' ;
7
+
8
+ const run = async ( ) => {
9
+ const cwd = path . resolve ( __dirname , './_playwright/projects' ) ;
10
+ const pluginConfig : Options = {
11
+ auth : {
12
+ apiKey : '123' ,
13
+ appKey : '123' ,
14
+ } ,
15
+ rum : {
16
+ sdk : {
17
+ applicationId : '123' ,
18
+ clientToken : '123' ,
19
+ } ,
20
+ } ,
21
+ customPlugins : ( opts , context ) => [ ...debugFilesPlugins ( context ) ] ,
22
+ } ;
23
+ const plugin = getEsbuildPlugin ( pluginConfig ) ;
24
+ const config = configEsbuild ( {
25
+ workingDir : cwd ,
26
+ entry : { esbuild : './index.js' } ,
27
+ outDir : path . resolve ( cwd , './dist' ) ,
28
+ plugins : [ plugin ] ,
29
+ } ) ;
30
+
31
+ const result = await esbuild . build ( config ) ;
32
+
33
+ console . log ( result ) ;
34
+ } ;
35
+
36
+ run ( ) ;
Original file line number Diff line number Diff line change @@ -1792,6 +1792,7 @@ __metadata:
1792
1792
rollup : " npm:4.24.2"
1793
1793
strip-ansi : " npm:6.0.1"
1794
1794
ts-jest : " npm:29.1.2"
1795
+ ts-node : " npm:10.9.2"
1795
1796
typescript : " npm:5.4.3"
1796
1797
vite : " npm:5.4.10"
1797
1798
webpack : " npm:5.92.1"
You can’t perform that action at this time.
0 commit comments