mirror of
https://github.com/MercuryWorkshop/bare-mux.git
synced 2025-05-17 08:00:01 -04:00
make snapshot.ts function better
This commit is contained in:
parent
a44ee2c48d
commit
37e22c731e
7 changed files with 34 additions and 52 deletions
|
@ -8,16 +8,6 @@ const pkg = JSON.parse(await readFile('package.json'));
|
|||
|
||||
const commonPlugins = () => [
|
||||
typescript(),
|
||||
inject(
|
||||
Object.fromEntries(
|
||||
['fetch', 'Request', 'Response', 'WebSocket', 'XMLHttpRequest', 'SharedWorker', 'localStorage', 'serviceWorker'].map(
|
||||
(name) => [
|
||||
name,
|
||||
[fileURLToPath(new URL('./src/snapshot.ts', import.meta.url)), name],
|
||||
]
|
||||
)
|
||||
)
|
||||
),
|
||||
replace({
|
||||
'self.BARE_MUX_VERSION': JSON.stringify(
|
||||
pkg.version
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue