Spaces:
Paused
Paused
Download esbuild.config.js from ZSCGR/Meting-API: direct link, hf CLI and curl.
- Browser
- Download file 1.87 kB
-
https://huggingface.co/spaces/ZSCGR/Meting-API/resolve/main/esbuild.config.js
- Command line
-
hf download hf://spaces/ZSCGR/Meting-API/esbuild.config.js
-
curl -L -o esbuild.config.js https://huggingface.co/spaces/ZSCGR/Meting-API/resolve/main/esbuild.config.js
1.87 kB
| import esbuild from 'esbuild'; | |
| import resolve from 'esbuild-plugin-resolve'; | |
| import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill' | |
| import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill' | |
| import textReplace from 'esbuild-plugin-text-replace' | |
| await esbuild.build({ | |
| entryPoints: ['./app.js'], | |
| bundle: true, | |
| format: 'esm', | |
| outfile: './dist/cloudflare-workers-min.js', | |
| external: [], | |
| plugins: [ | |
| resolve({ | |
| crypto: 'crypto-browserify' | |
| }), | |
| NodeGlobalsPolyfillPlugin({ | |
| process: true, | |
| buffer: true, | |
| }), | |
| NodeModulesPolyfillPlugin(), | |
| ], | |
| minify: true, | |
| }); | |
| await esbuild.build({ | |
| entryPoints: ['./app.js'], | |
| bundle: true, | |
| format: 'esm', | |
| outfile: './dist/cloudflare-workers.js', | |
| external: [], | |
| plugins: [ | |
| resolve({ | |
| crypto: 'crypto-browserify' | |
| }), | |
| NodeGlobalsPolyfillPlugin({ | |
| process: true, | |
| buffer: true, | |
| }), | |
| NodeModulesPolyfillPlugin(), | |
| ], | |
| }); | |
| await esbuild.build({ | |
| entryPoints: ['./deno.js'], | |
| bundle: true, | |
| format: 'esm', | |
| outfile: './dist/deno.js', | |
| external: [], | |
| plugins: [ | |
| textReplace({ | |
| include: new RegExp("src/providers/netease/crypto\.js"), | |
| pattern: [ | |
| ["import crypto from 'crypto-browserify'", "import crypto from 'https://esm.sh/crypto-browserify@3.12.0'"], | |
| ["import { Buffer } from 'buffer/index.js'","import { Buffer } from 'https://esm.sh/buffer@6.0.3'"] | |
| ] | |
| }), | |
| resolve({ | |
| crypto: 'crypto-browserify' | |
| }), | |
| NodeGlobalsPolyfillPlugin({ | |
| process: true, | |
| buffer: true, | |
| }), | |
| NodeModulesPolyfillPlugin(), | |
| ], | |
| // minify: true, | |
| }); | |