@@ -11,12 +11,44 @@ module.exports = (env) => {
1111 config . resolve . alias . set ( '@demo/shared' , resolve ( __dirname , '..' , '..' , 'tools' , 'demo' ) ) ;
1212 } ) ;
1313
14- // Example if you need to share images across demo apps:
15- // webpack.Utils.addCopyRule({
16- // from: '../../../tools/images',
17- // to: 'images',
18- // context: webpack.Utils.project.getProjectFilePath('node_modules')
19- // });
14+ webpack . Utils . addCopyRule ( '**/*.svg' )
15+ webpack . Utils . addCopyRule ( '**/*.mp4' )
16+
17+ webpack . Utils . addCopyRule ( {
18+ from : '../../../tools/demo/canvas/assets' ,
19+ to : 'assets/file-assets' ,
20+ context : webpack . Utils . project . getProjectFilePath ( 'node_modules' )
21+ } ) ;
22+
23+ webpack . Utils . addCopyRule ( {
24+ from : '../../../tools/demo/canvas-babylon/assets' ,
25+ to : 'assets/babylon' ,
26+ context : webpack . Utils . project . getProjectFilePath ( 'node_modules' )
27+ } ) ;
28+
29+ webpack . Utils . addCopyRule ( {
30+ from : '../../../tools/demo/canvas-phaser/assets' ,
31+ to : 'assets/phaser' ,
32+ context : webpack . Utils . project . getProjectFilePath ( 'node_modules' )
33+ } ) ;
34+
35+ webpack . Utils . addCopyRule ( {
36+ from : '../../../tools/demo/canvas-phaser-ce/assets' ,
37+ to : 'assets/phaser-ce' ,
38+ context : webpack . Utils . project . getProjectFilePath ( 'node_modules' )
39+ } ) ;
40+
41+ webpack . Utils . addCopyRule ( {
42+ from : '../../../tools/demo/canvas-pixi/assets' ,
43+ to : 'assets/pixi' ,
44+ context : webpack . Utils . project . getProjectFilePath ( 'node_modules' )
45+ } ) ;
46+
47+ webpack . Utils . addCopyRule ( {
48+ from : '../../../tools/demo/canvas-three/assets' ,
49+ to : 'assets/three' ,
50+ context : webpack . Utils . project . getProjectFilePath ( 'node_modules' )
51+ } ) ;
2052
2153 return webpack . resolveConfig ( ) ;
2254} ;
0 commit comments