消除rollup打包Circular dependency警告

This commit is contained in:
liteng 2018-08-04 07:43:56 +08:00
parent 31c181ca5c
commit c956722313
3 changed files with 26 additions and 17 deletions

View File

@ -848,7 +848,9 @@
<Content Include="third_party\WaterShader.js" />
<Content Include="third_party\workers\OffscreenCanvas.js" />
<Content Include="third_party\zlib_and_gzip.min.js" />
<Content Include="Web.config" />
<Content Include="Web.config">
<SubType>Designer</SubType>
</Content>
</ItemGroup>
<ItemGroup>
<Compile Include="Global.asax.cs">

View File

@ -1,5 +1,5 @@
import BaseSerializer from '../BaseSerializer';
import Application from '../../Application';
// import Application from '../../Application';
/**
* 配置序列化器
@ -12,13 +12,16 @@ ConfigSerializer.prototype = Object.create(BaseSerializer.prototype);
ConfigSerializer.prototype.constructor = ConfigSerializer;
ConfigSerializer.prototype.filter = function (obj) {
if (obj instanceof Application) {
return true;
} else if (obj.metadata && obj.metadata.generator === this.constructor.name) {
return true;
} else {
return false;
}
// TODO: 消除rollup打包Circular dependency警告
// if (obj instanceof Application) {
// return true;
// } else if (obj.metadata && obj.metadata.generator === this.constructor.name) {
// return true;
// } else {
// return false;
// }
return false;
};
ConfigSerializer.prototype.toJSON = function (app) {

View File

@ -1,5 +1,5 @@
import BaseSerializer from '../BaseSerializer';
import Application from '../../Application';
// import Application from '../../Application';
/**
* Object3D序列化器
@ -12,13 +12,17 @@ ScriptSerializer.prototype = Object.create(BaseSerializer.prototype);
ScriptSerializer.prototype.constructor = ScriptSerializer;
ScriptSerializer.prototype.filter = function (obj) {
if (obj instanceof Application) {
return true;
} else if (obj.metadata && obj.metadata.generator === this.constructor.name) {
return true;
} else {
return false;
}
// TODO: 消除rollup打包Circular dependency警告
// if (obj instanceof Application) {
// return true;
// } else if (obj.metadata && obj.metadata.generator === this.constructor.name) {
// return true;
// } else {
// return false;
// }
return false;
};
ScriptSerializer.prototype.toJSON = function (app) {