Skip to content

Commit

Permalink
feat(harmony): ExtApiBlackList
Browse files Browse the repository at this point in the history
  • Loading branch information
StrivingRabbit committed Dec 31, 2024
1 parent a8d7d99 commit 178a17c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/uni-app-harmony/src/compiler/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ export const ExtApiBlackListX = [
'uni-prompt',
'uni-media',
]

export const ExtApiBlackList = ['uni-loadFontFace']
8 changes: 6 additions & 2 deletions packages/uni-app-harmony/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import babel from '@rollup/plugin-babel'
import { capitalize, cssTarget, parseInjects } from '@dcloudio/uni-cli-shared'
import { isH5CustomElement } from '@dcloudio/uni-shared'
import { resolveExtApiTempDir } from '../../scripts/ext-api'
import { ExtApiBlackListX, StandaloneExtApi } from './src/compiler/constants'
import { ExtApiBlackList, ExtApiBlackListX, StandaloneExtApi } from './src/compiler/constants'

function resolve(file: string) {
return path.resolve(__dirname, file)
Expand Down Expand Up @@ -243,7 +243,11 @@ function generateExtApiSourceCode(isUniAppX = false) {
const extApiStandaloneBuildJson: IStandaloneExtApi[] = []

for (const extApi in extApiStore) {
if (isUniAppX && ExtApiBlackListX.includes(extApi)) {
if (isUniAppX) {
if (ExtApiBlackListX.includes(extApi)) {
continue
}
} else if (ExtApiBlackList.includes(extApi)) {
continue
}
const extApiPath = extApiStore[extApi]
Expand Down

0 comments on commit 178a17c

Please sign in to comment.