Skip to content

Commit

Permalink
fix: resolve scratch-*/src/index.js for expose-loader
Browse files Browse the repository at this point in the history
require.resolve is a nodejs api that resolves as node resolves. An
enhanced-resolve instance, the library webpack uses, could resolve as
webpack will or we can use some slightly more manual definitions here
for exposing parts of scratch on the global object for the playground's
benchmark to use.
  • Loading branch information
mzgoddard committed Jun 1, 2018
1 parent 057e89b commit fda2885
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ module.exports = [
loader: 'expose-loader?Blockly'
},
{
test: require.resolve('scratch-audio'),
test: require.resolve('scratch-audio/src/index.js'),
loader: 'expose-loader?AudioEngine'
},
{
test: require.resolve('scratch-storage'),
test: require.resolve('scratch-storage/src/index.js'),
loader: 'expose-loader?ScratchStorage'
},
{
test: require.resolve('scratch-render'),
test: require.resolve('scratch-render/src/index.js'),
loader: 'expose-loader?ScratchRender'
}
])
Expand Down

0 comments on commit fda2885

Please sign in to comment.