diff --git a/js-framework/demo.ts b/js-framework/demo.ts index 79052d48..5b3ccecd 100644 --- a/js-framework/demo.ts +++ b/js-framework/demo.ts @@ -1,5 +1,4 @@ -import { Text, Alignment, Color, VLayout, Panel, log, logw, loge } from "./index" -import { NativeCall } from "./src/ui/panel"; +import { NativeCall, Text, Alignment, Color, VLayout, Panel, log, logw, loge } from "./index" diff --git a/js-framework/rollup.config.js b/js-framework/rollup.config.js index 2e848923..d6947aa1 100644 --- a/js-framework/rollup.config.js +++ b/js-framework/rollup.config.js @@ -14,7 +14,6 @@ export default [ sourceMap: true, plugins: [ resolve({ jsnext: true, main: true }), - commonjs() ] }, { @@ -26,7 +25,7 @@ export default [ sourceMap: true, plugins: [ resolve({ jsnext: true, main: true }), - ] + ], }, { input: "build/demo.js", diff --git a/js-framework/src/runtime/global.ts b/js-framework/src/runtime/global.ts index aeefe61f..a17de6fc 100644 --- a/js-framework/src/runtime/global.ts +++ b/js-framework/src/runtime/global.ts @@ -1,4 +1,5 @@ import { Context } from "./sandbox"; +require('reflect-metadata'); declare global { const context: Context; diff --git a/js-framework/src/ui/view.ts b/js-framework/src/ui/view.ts index 1cf17859..6b21c836 100644 --- a/js-framework/src/ui/view.ts +++ b/js-framework/src/ui/view.ts @@ -1,6 +1,5 @@ import { Color, GradientColor } from "../util/color" import { Modeling, Model, obj2Model } from "../util/types"; -import "reflect-metadata" import { uniqueId } from "../util/uniqueId"; import { loge } from "../util/log";