| 8 | import { nodeModulesPolyfillPlugin } from 'esbuild-plugins-node-modules-polyfill'; |
| 9 | |
| 10 | const html = (contents) => `<!DOCTYPE html> |
| 11 | <html lang="en"> |
| 12 | <head> |
| 13 | <meta charset="UTF-8"> |
| 14 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 15 | <meta http-equiv="X-UA-Compatible" content="ie=edge"> |
| 16 | <title>browserless.io function runner</title> |
| 17 | <script type="module"> |
| 18 | ${contents} |
| 19 | </script> |
| 20 | </head> |
| 21 | <body> |
| 22 | </body> |
| 23 | </html> |
| 24 | `; |
| 25 | |
| 26 | const entryPoints = ['src/shared/utils/function/client.ts']; |
| 27 | const outfile = join(process.cwd(), 'static/function/client.js'); |