From a37bfcecdea18330bd9d229b9132d7e5dbe382a5 Mon Sep 17 00:00:00 2001 From: ymayarajan3 Date: Tue, 21 May 2024 17:34:07 -0400 Subject: [PATCH] raw loader fix --- src/lib/default-project/index.js | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/src/lib/default-project/index.js b/src/lib/default-project/index.js index bf27dc75ec2..46e62d968e3 100644 --- a/src/lib/default-project/index.js +++ b/src/lib/default-project/index.js @@ -1,17 +1,12 @@ import projectData from './project-data'; /* eslint-disable import/no-unresolved */ -import popWav from '!arraybuffer-loader!./83a9787d4cb6f3b7632b4ddfebf74367.wav'; -import meowWav from '!arraybuffer-loader!./83c36d806dc92327b9e7049a565c6bff.wav'; -import motorWav from '!arraybuffer-loader!./tinybit_motor.wav'; -import backdrop from '!raw-loader!./cd21514d0531fdffb22204e0ec5ed84a.svg'; -import costume1 from '!raw-loader!./tinybit_top.svg'; -import costume2 from '!raw-loader!./tinybit_heart.svg'; -import svgVar from './tinybit_top'; -import backdropVar from './backdrop' -import popWavVar from './popWav'; -import meowWavVar from './meowWav'; -import tinybit_motorWavVar from './tinybit_motorWav'; +import popWav from '!!arraybuffer-loader!./83a9787d4cb6f3b7632b4ddfebf74367.wav'; +import meowWav from '!!arraybuffer-loader!./83c36d806dc92327b9e7049a565c6bff.wav'; +import motorWav from '!!arraybuffer-loader!./tinybit_motor.wav'; +import backdrop from '!!raw-loader!./cd21514d0531fdffb22204e0ec5ed84a.svg'; +import costume1 from '!!raw-loader!./tinybit_top.svg'; +import costume2 from '!!raw-loader!./tinybit_heart.svg'; /* eslint-enable import/no-unresolved */ function base64ToArrayBuffer(base64) { @@ -24,8 +19,6 @@ function base64ToArrayBuffer(base64) { } const defaultProject = translator => { - costume1 = svgVar; - backdrop = backdropVar; let _TextEncoder; if (typeof TextEncoder === 'undefined') { @@ -46,17 +39,17 @@ const defaultProject = translator => { id: '83a9787d4cb6f3b7632b4ddfebf74367', assetType: 'Sound', dataFormat: 'WAV', - data: new Uint8Array(base64ToArrayBuffer(popWavVar)), + data: new Uint8Array(popWav), }, { id: '83c36d806dc92327b9e7049a565c6bff', assetType: 'Sound', dataFormat: 'WAV', - data: new Uint8Array(base64ToArrayBuffer(meowWavVar)) + data: new Uint8Array(meowWav) }, { id: '93c36d806dc92327b9e7049a565c6bff', assetType: 'Sound', dataFormat: 'WAV', - data: new Uint8Array(base64ToArrayBuffer(tinybit_motorWavVar)), + data: new Uint8Array(motorWav), }, { id: 'cd21514d0531fdffb22204e0ec5ed84a', assetType: 'ImageVector',