Skip to content

Commit

Permalink
fix: call defineEntry before importing tiny-engine
Browse files Browse the repository at this point in the history
  • Loading branch information
gene9831 committed May 29, 2024
1 parent 02ff87a commit 1423047
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
16 changes: 16 additions & 0 deletions designer-demo/src/defineEntry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Copyright (c) 2023 - present TinyEngine Authors.
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

import registry from '../registry.js'
import { defineEntry } from '@opentiny/tiny-engine-entry'

defineEntry(registry)
5 changes: 2 additions & 3 deletions designer-demo/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
*
*/

import registry from '../registry.js'
import { defineEntry } from '@opentiny/tiny-engine-entry'
// 导入@opentiny/tiny-engine时,内部的依赖包也会逐个导入,可能会执行useComplie,此时需要templateHashMap。所以需要先执行一次defineEntry
import './defineEntry.js'
import { init } from '@opentiny/tiny-engine'

defineEntry(registry)
init()

0 comments on commit 1423047

Please sign in to comment.