refactor(sfx.js): use vite imports for npm run build to work properly
This commit is contained in:
@@ -1,12 +1,22 @@
|
||||
// Import audio files as modules so Vite bundles them
|
||||
import chestCloseUrl from "../../sfx/sfx_chest_close.wav";
|
||||
import chestOpenUrl from "../../sfx/sfx_chest_open.wav";
|
||||
import clickUrl from "../../sfx/sfx_click.wav";
|
||||
import clockUrl from "../../sfx/sfx_clock.wav";
|
||||
import keyUrl from "../../sfx/sfx_key.wav";
|
||||
import loseUrl from "../../sfx/sfx_lose.wav";
|
||||
import stepUrl from "../../sfx/sfx_step.wav";
|
||||
import winUrl from "../../sfx/sfx_win.wav";
|
||||
|
||||
const soundFiles = {
|
||||
chestClose: "/sfx/sfx_chest_close.wav",
|
||||
chestOpen: "/sfx/sfx_chest_open.wav",
|
||||
click: "/sfx/sfx_click.wav",
|
||||
clock: "/sfx/sfx_clock.wav",
|
||||
key: "/sfx/sfx_key.wav",
|
||||
lose: "/sfx/sfx_lose.wav",
|
||||
step: "/sfx/sfx_step.wav",
|
||||
win: "/sfx/sfx_win.wav",
|
||||
chestClose: chestCloseUrl,
|
||||
chestOpen: chestOpenUrl,
|
||||
click: clickUrl,
|
||||
clock: clockUrl,
|
||||
key: keyUrl,
|
||||
lose: loseUrl,
|
||||
step: stepUrl,
|
||||
win: winUrl,
|
||||
};
|
||||
|
||||
const sounds = {};
|
||||
|
||||
Reference in New Issue
Block a user