From fda288506aac8d0dc82e59d1723518ad4544456d Mon Sep 17 00:00:00 2001 From: "Michael \"Z\" Goddard" Date: Fri, 1 Jun 2018 13:38:18 -0400 Subject: [PATCH] fix: resolve scratch-*/src/index.js for expose-loader 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. --- webpack.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 6eca43f5..9d6f07d6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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' } ])