Commit ce8afae0 authored by rockyl's avatar rockyl

增加自定义模块支持

parent 0b63ae5e
......@@ -27,7 +27,7 @@
"scripts": {
"build-webpack": "webpack",
"rollup": "rollup -c",
"rename": "node scripts/rename-hash.js dist/index.js",
"rename": "node scripts/rename-hash.js dist/engine.js",
"build": "yarn rollup && yarn rename",
"ts": "dts-bundle --name engine --main types/src/index.d.ts --out ../../dist/index.d.ts",
"test": "echo \"Error: no test specified\" && exit 1",
......
......@@ -12,7 +12,7 @@ export default {
input: 'src/index.ts',
output: [
{
file: `dist/index.js`,
file: `dist/engine.js`,
format: 'umd',
name: 'engine',
sourcemap: true,
......
......@@ -92,7 +92,9 @@ export class GameStage extends Container {
let total = assets.length;
if (customs) {
for (let custom of customs) {
total += custom.assets.length;
if(custom.assets){
total += custom.assets.length;
}
}
}
......@@ -100,7 +102,9 @@ export class GameStage extends Container {
await loadAssets(assets, p);
if (customs) {
for (let custom of customs) {
await loadAssets(custom.assets, p);
if(custom.assets){
await loadAssets(custom.assets, p);
}
}
}
hideLoadingView();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment