mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-17 09:42:39 -04:00
Playground: use UMD to load storage as global (#722)
* Playground: use UMD to load storage as global It appears that `expose-loader` is not compatible with WebPack's UMD exporter, so the VM playground broke when I converted `scratch-storage` to use UMD. This change causes the playground to load `scratch-storage` as an independent script and relies on its UMD loader to expose it as a global. Bonus points: we get better source mapping this way. * Playground: tell eslint about global ScratchStorage
This commit is contained in:
parent
ceb47bd765
commit
d8a3e659d5
3 changed files with 7 additions and 9 deletions
|
@ -77,9 +77,7 @@ module.exports = [
|
|||
// Audio
|
||||
'scratch-audio',
|
||||
// Renderer
|
||||
'scratch-render',
|
||||
// Storage
|
||||
'scratch-storage'
|
||||
'scratch-render'
|
||||
]
|
||||
},
|
||||
output: {
|
||||
|
@ -111,10 +109,6 @@ module.exports = [
|
|||
{
|
||||
test: require.resolve('scratch-render'),
|
||||
loader: 'expose-loader?RenderWebGL'
|
||||
},
|
||||
{
|
||||
test: require.resolve('scratch-storage'),
|
||||
loader: 'expose-loader?Scratch.Storage'
|
||||
}
|
||||
])
|
||||
},
|
||||
|
@ -124,6 +118,8 @@ module.exports = [
|
|||
to: 'media'
|
||||
}, {
|
||||
from: 'node_modules/highlightjs/styles/zenburn.css'
|
||||
}, {
|
||||
from: 'node_modules/scratch-storage/dist/web'
|
||||
}, {
|
||||
from: 'src/playground'
|
||||
}])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue