feat: add bark battle browser prototype
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import crypto from 'node:crypto';
|
||||
import { createRequire } from 'node:module';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { pathToFileURL } from 'node:url';
|
||||
|
||||
if (crypto.webcrypto) {
|
||||
if (typeof crypto.getRandomValues !== 'function') {
|
||||
@@ -13,4 +16,7 @@ if (crypto.webcrypto) {
|
||||
}
|
||||
}
|
||||
|
||||
await import('../node_modules/vite/bin/vite.js');
|
||||
const require = createRequire(import.meta.url);
|
||||
const vitePackageJsonPath = require.resolve('vite/package.json');
|
||||
const viteBinPath = join(dirname(vitePackageJsonPath), 'bin', 'vite.js');
|
||||
await import(pathToFileURL(viteBinPath).href);
|
||||
|
||||
Reference in New Issue
Block a user