Skip to content

Commit

Permalink
Merge pull request #13 from mitmedialab/scratch-package-refactor-merg…
Browse files Browse the repository at this point in the history
…e-music-creation

changes to get music buffers bundling correctly
  • Loading branch information
pmalacho-mit authored Jul 24, 2024
2 parents 58fdedf + 811b05a commit 286cc46
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
22 changes: 22 additions & 0 deletions src/lib/libraries/extensions/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,32 @@ import gdxforInsetIconURL from './gdxfor/gdxfor-small.svg';
import gdxforConnectionIconURL from './gdxfor/gdxfor-illustration.svg';
import gdxforConnectionSmallIconURL from './gdxfor/gdxfor-small.svg';

import musicCreationIconURL from './music/music.png';
import musicCreationInsetIconURL from './music/music-small.svg';

export default [
/* DO NOT REMOVE */
...generatedDetails,
/* DO NOT REMOVE */
{
name: 'Music Creation',
extensionId: 'musiccreation',
iconURL: musicCreationIconURL,
insetIconURL: musicCreationInsetIconURL,
description: (
<FormattedMessage
defaultMessage="Create music of your choice."
description="my block"
id="gui.extension.musiccreation.description"
/>
),
featured: true,
disabled: false,
internetConnectionRequired: true,
bluetoothRequired: false,
helpLink: 'https://scratch.mit.edu/wedo'

},
{
name: (
<FormattedMessage
Expand Down
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const baseConfig = new ScratchWebpackConfigBuilder(
]
})
.addModuleRule({
test: /\.(svg|png|wav|mp3|gif|jpg)$/,
test: /\.(svg|png|wav|gif|jpg)$/, // removed mp3 as it was conflicting with buffer loading
resourceQuery: /^$/, // reject any query string
type: 'asset' // let webpack decide on the best type of asset
})
Expand Down Expand Up @@ -126,7 +126,7 @@ const baseConfig = new ScratchWebpackConfigBuilder(
},
include: [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'node_modules', 'scratch-vm', 'src'),
path.resolve(__dirname, 'node_modules', 'scratch-vm', 'src'),
path.resolve(__dirname, '..', 'scratch-vm', 'src'),
]
});
Expand Down

0 comments on commit 286cc46

Please sign in to comment.