Skip to content

Commit

Permalink
feat: independen entry for canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
chilingling committed Jun 7, 2024
1 parent b900b3b commit 76ee252
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion designer-demo/src/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
*
*/

import { createRender } from '@opentiny/tiny-engine'
import { createRender } from '@opentiny/tiny-engine/canvas'

createRender(window.parent.TinyGlobalConfig)
2 changes: 2 additions & 0 deletions packages/design-core/canvas.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// 不能在 index.js 导出,不然主应用样式会污染画布
export { createRender } from '@opentiny/tiny-engine-canvas'
1 change: 0 additions & 1 deletion packages/design-core/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export { init } from './src/init'
export { createRender } from '@opentiny/tiny-engine-canvas'
1 change: 1 addition & 0 deletions packages/design-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"main": "index.js",
"exports": {
".": "index.js",
"./canvas": "./canvas.js",
"./vite.config.js": "./vite.config.js",
"./config/lowcode.config": "./config/lowcode.config.js",
"./scripts/externalDeps": "./scripts/externalDeps.js"
Expand Down

0 comments on commit 76ee252

Please sign in to comment.