Spaces:
Sleeping
Sleeping
Download node_modules/vite/bin/vite.js from underrate/snake-reactor: direct link, hf CLI and curl.
- Browser
- Download file 1.67 kB
-
https://huggingface.co/spaces/underrate/snake-reactor/resolve/main/node_modules/vite/bin/vite.js
- Command line
-
hf download hf://spaces/underrate/snake-reactor/node_modules/vite/bin/vite.js
-
curl -L -o vite.js https://huggingface.co/spaces/underrate/snake-reactor/resolve/main/node_modules/vite/bin/vite.js
1.67 kB
| import { performance } from 'node:perf_hooks' | |
| if (!import.meta.url.includes('node_modules')) { | |
| try { | |
| // only available as dev dependency | |
| await import('source-map-support').then((r) => r.default.install()) | |
| } catch (e) {} | |
| } | |
| global.__vite_start_time = performance.now() | |
| // check debug mode first before requiring the CLI. | |
| const debugIndex = process.argv.findIndex((arg) => /^(?:-d|--debug)$/.test(arg)) | |
| const filterIndex = process.argv.findIndex((arg) => | |
| /^(?:-f|--filter)$/.test(arg), | |
| ) | |
| const profileIndex = process.argv.indexOf('--profile') | |
| if (debugIndex > 0) { | |
| let value = process.argv[debugIndex + 1] | |
| if (!value || value.startsWith('-')) { | |
| value = 'vite:*' | |
| } else { | |
| // support debugging multiple flags with comma-separated list | |
| value = value | |
| .split(',') | |
| .map((v) => `vite:${v}`) | |
| .join(',') | |
| } | |
| process.env.DEBUG = `${ | |
| process.env.DEBUG ? process.env.DEBUG + ',' : '' | |
| }${value}` | |
| if (filterIndex > 0) { | |
| const filter = process.argv[filterIndex + 1] | |
| if (filter && !filter.startsWith('-')) { | |
| process.env.VITE_DEBUG_FILTER = filter | |
| } | |
| } | |
| } | |
| function start() { | |
| return import('../dist/node/cli.js') | |
| } | |
| if (profileIndex > 0) { | |
| process.argv.splice(profileIndex, 1) | |
| const next = process.argv[profileIndex] | |
| if (next && !next.startsWith('-')) { | |
| process.argv.splice(profileIndex, 1) | |
| } | |
| const inspector = await import('node:inspector').then((r) => r.default) | |
| const session = (global.__vite_profile_session = new inspector.Session()) | |
| session.connect() | |
| session.post('Profiler.enable', () => { | |
| session.post('Profiler.start', start) | |
| }) | |
| } else { | |
| start() | |
| } | |