diff --git a/packages/fineui/src/worker.js b/packages/fineui/src/worker.js new file mode 100644 index 000000000..2956dde18 --- /dev/null +++ b/packages/fineui/src/worker.js @@ -0,0 +1,36 @@ +// sideEffects +import "./core/system"; + +import * as _core from "./core"; +import * as _base from "./base"; +import * as _fix from "./fix"; +import * as _router from "./router"; + +export * as Popper from "@popperjs/core"; + +import * as D from "@/core/decorator"; +import { Fix } from "./fix"; + +const Decorators = { ...D, Model: Fix.Model }; + +const fuiExport = { + ..._core, + ..._base, + ..._fix, + ..._router +}; + +import * as injectFn from "@/core/5.inject"; +import { _global } from "@/core/0.foundation"; +import { _defineVarProperties } from "@/core/constant/writable.var"; + +_global.BI = _global.BI || {}; + +Object.assign(_global, { + Fix: fuiExport.Fix, + _: fuiExport._, +}); + +Object.assign(_global.BI, fuiExport, injectFn, { Decorators, }); + +_defineVarProperties(_global.BI); diff --git a/packages/fineui/webpack/attachments.js b/packages/fineui/webpack/attachments.js index be1d89017..3adb47d20 100644 --- a/packages/fineui/webpack/attachments.js +++ b/packages/fineui/webpack/attachments.js @@ -19,7 +19,8 @@ const basicAttachmentMap = { "src/less/widget/**/*.less", "src/less/component/**/*.less" ]), - js_bundle: sync(["src/bundle.js"]) + js_bundle: sync(["src/bundle.js"]), + js_worker: sync(["src/worker.js"]) }; const bundleCss = [].concat(basicAttachmentMap.less, sync(["public/less/app.less", "public/less/**/*.less"])); @@ -34,8 +35,7 @@ const fineui = [].concat( ); const fineuiForWorker = [].concat( - jqueryPolyfill, - basicAttachmentMap.js_bundle, + basicAttachmentMap.js_worker, basicAttachmentMap.ui, basicAttachmentMap.ts );