From 1a93a70e31ee7bd393140bf9f0458a9be38b8c41 Mon Sep 17 00:00:00 2001 From: Carlos Kelly Date: Tue, 1 Nov 2022 08:45:10 -0500 Subject: [PATCH] Fix require of raw code samples in demo slides. --- demo/slides/loop.js | 7 ++++--- demo/slides/physics.js | 18 +++++++++--------- demo/slides/scaling.js | 8 ++++---- demo/slides/sprites.js | 6 +++--- demo/slides/tilemaps.js | 12 ++++++------ 5 files changed, 26 insertions(+), 25 deletions(-) diff --git a/demo/slides/loop.js b/demo/slides/loop.js index 0fc8def..965b0e9 100644 --- a/demo/slides/loop.js +++ b/demo/slides/loop.js @@ -2,6 +2,7 @@ import React from 'react'; import Slide from './slide'; + export default { slides: [ @@ -13,7 +14,7 @@ export default {
         
-          {require('raw-loader!../code-samples/raf.example')}
+          {require('raw-loader!../code-samples/raf.example').default}
         
       
, @@ -23,7 +24,7 @@ export default {
         
-          {require('raw-loader!../code-samples/loop.example')}
+          {require('raw-loader!../code-samples/loop.example').default}
         
       
, @@ -33,7 +34,7 @@ export default {
         
-          {require('raw-loader!../code-samples/loop-use.example')}
+          {require('raw-loader!../code-samples/loop-use.example').default}
         
       
, diff --git a/demo/slides/physics.js b/demo/slides/physics.js index ffcb161..d043d76 100644 --- a/demo/slides/physics.js +++ b/demo/slides/physics.js @@ -11,7 +11,7 @@ export default {
         
-          {require('raw-loader!../code-samples/physics-simple.example')}
+          {require('raw-loader!../code-samples/physics-simple.example').default}
         
       
, @@ -24,14 +24,14 @@ export default {
         
-          {require('raw-loader!../code-samples/physics-world.example')}
+          {require('raw-loader!../code-samples/physics-world.example').default}
         
       
,
         
-          {require('raw-loader!../code-samples/physics-world-init.example')}
+          {require('raw-loader!../code-samples/physics-world-init.example').default}
         
       
, @@ -41,7 +41,7 @@ export default {
         
-          {require('raw-loader!../code-samples/physics-update.example')}
+          {require('raw-loader!../code-samples/physics-update.example').default}
         
       
, @@ -51,14 +51,14 @@ export default {
         
-          {require('raw-loader!../code-samples/physics-body.example')}
+          {require('raw-loader!../code-samples/physics-body.example').default}
         
       
,
         
-          {require('raw-loader!../code-samples/physics-body-update.example')}
+          {require('raw-loader!../code-samples/physics-body-update.example').default}
         
       
, @@ -71,21 +71,21 @@ export default {
         
-          {require('raw-loader!../code-samples/physics-store.example')}
+          {require('raw-loader!../code-samples/physics-store.example').default}
         
       
,
         
-          {require('raw-loader!../code-samples/physics-mobx-update.example')}
+          {require('raw-loader!../code-samples/physics-mobx-update.example').default}
         
       
,
         
-          {require('raw-loader!../code-samples/physics-style.example')}
+          {require('raw-loader!../code-samples/physics-style.example').default}
         
       
, diff --git a/demo/slides/scaling.js b/demo/slides/scaling.js index 6064cd6..6bff451 100644 --- a/demo/slides/scaling.js +++ b/demo/slides/scaling.js @@ -23,7 +23,7 @@ export default {
         
-          {require('raw-loader!../code-samples/stage.example')}
+          {require('raw-loader!../code-samples/stage.example').default}
         
       
, @@ -33,14 +33,14 @@ export default {
         
-          {require('raw-loader!../code-samples/stage-size.example')}
+          {require('raw-loader!../code-samples/stage-size.example').default}
         
       
,
         
-          {require('raw-loader!../code-samples/stage-use.example')}
+          {require('raw-loader!../code-samples/stage-use.example').default}
         
       
, @@ -50,7 +50,7 @@ export default {
         
-          {require('raw-loader!../code-samples/stage-blurry.example')}
+          {require('raw-loader!../code-samples/stage-blurry.example').default}
         
       
, diff --git a/demo/slides/sprites.js b/demo/slides/sprites.js index 99b4f5a..19b46f7 100644 --- a/demo/slides/sprites.js +++ b/demo/slides/sprites.js @@ -26,14 +26,14 @@ export default {
         
-          {require('raw-loader!../code-samples/sprite-manual.example')}
+          {require('raw-loader!../code-samples/sprite-manual.example').default}
         
       
,
         
-          {require('raw-loader!../code-samples/sprite-style.example')}
+          {require('raw-loader!../code-samples/sprite-style.example').default}
         
       
, @@ -43,7 +43,7 @@ export default {
         
-          {require('raw-loader!../code-samples/sprite.example')}
+          {require('raw-loader!../code-samples/sprite.example').default}
         
       
, diff --git a/demo/slides/tilemaps.js b/demo/slides/tilemaps.js index 373566c..fddca7d 100644 --- a/demo/slides/tilemaps.js +++ b/demo/slides/tilemaps.js @@ -26,7 +26,7 @@ export default {
         
-          {require('raw-loader!../code-samples/tilemap-map.example')}
+          {require('raw-loader!../code-samples/tilemap-map.example').default}
         
       
, @@ -36,14 +36,14 @@ export default {
         
-          {require('raw-loader!../code-samples/tilemap-manual.example')}
+          {require('raw-loader!../code-samples/tilemap-manual.example').default}
         
       
,
         
-          {require('raw-loader!../code-samples/tilemap-render.example')}
+          {require('raw-loader!../code-samples/tilemap-render.example').default}
         
       
, @@ -53,14 +53,14 @@ export default {
         
-          {require('raw-loader!../code-samples/tilemap.example')}
+          {require('raw-loader!../code-samples/tilemap.example').default}
         
       
,
         
-          {require('raw-loader!../code-samples/tilemap-buildings.example')}
+          {require('raw-loader!../code-samples/tilemap-buildings.example').default}
         
       
, @@ -70,7 +70,7 @@ export default {
         
-          {require('raw-loader!../code-samples/tilemap-custom.example')}
+          {require('raw-loader!../code-samples/tilemap-custom.example').default}
         
       
,