Skip to content

Commit

Permalink
chore: update supported modules; fix: add global performance lib to b…
Browse files Browse the repository at this point in the history
…anner;
  • Loading branch information
gabrielmpinto committed Oct 25, 2024
1 parent 7d82ec4 commit ad4aa49
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const createFleekBuildConfig = (options: FleekBuildOptions): BuildOptions
js: `
import { Buffer } from "node:buffer";
import { AsyncLocalStorage } from "node:async_hooks";
import { PerformanceObserver, performance } from 'node:perf_hooks';
globalThis.AsyncLocalStorage = AsyncLocalStorage;
globalThis.fleek={env:{${Object.entries(env)
.map(([key, value]) => `${key}: "${value}"`)
Expand Down
41 changes: 22 additions & 19 deletions src/runtimeModules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,58 @@
// due to environment constraints
// optimized for edge computing
export const supportedRuntimeModules = [
'async_hooks',
'buffer',
'crypto',
'domain',
'events',
'http',
'https',
'path',
'punycode',
'stream',
'string_decoder',
'url',
'util',
'zlib',
'assert',
'assert/strict',
'async_hooks',
'buffer',
'child_process',
'cluster',
'console',
'constants',
'crypto',
'dgram',
'diagnostics_channel',
'dns',
'dns/promises',
'domain',
'events',
'fs',
'fs/promises',
'http',
'http2',
'https',
'inspector',
'inspector/promises',
'module',
'net',
'os',
'path/posix',
'path/win32',
'path',
'perf_hooks',
'process',
'punycode',
'querystring',
'readline',
'repl',
'sea',
'sqlite',
'stream',
'stream/consumers',
'stream/promises',
'stream/web',
'sys',
'string_decoder',
'test/reporters',
'timers',
'timers/promises',
'tls',
'trace_events',
'tty',
'url',
'util',
'v8',
'vm',
'wasi',
'webcrypto',
'worker_threads',
'zlib',
];

export const unsupportedRuntimeModules = [];
export const unsupportedRuntimeModules = ['fs', 'fs/promises', 'os', 'process', 'sys'];

0 comments on commit ad4aa49

Please sign in to comment.