diff --git a/packages/taro-rn-runner/package.json b/packages/taro-rn-runner/package.json index f31efd7656fe..ed58a22bccee 100644 --- a/packages/taro-rn-runner/package.json +++ b/packages/taro-rn-runner/package.json @@ -53,7 +53,6 @@ "metro-resolver": "^0.67.0", "mime-types": "^2.1.27", "qrcode-terminal": "^0.12.0", - "rollup-plugin-clear": "^2.0.7", "rollup-plugin-image-file": "^1.0.2" }, "devDependencies": { diff --git a/packages/taro-rn-runner/src/config/build-component.ts b/packages/taro-rn-runner/src/config/build-component.ts index 611da739818b..739d748df9f2 100644 --- a/packages/taro-rn-runner/src/config/build-component.ts +++ b/packages/taro-rn-runner/src/config/build-component.ts @@ -10,7 +10,6 @@ import { getAppConfig } from '@tarojs/rn-transformer' import * as jsx from 'acorn-jsx' import * as path from 'path' import { rollup, RollupOptions } from 'rollup' -import * as clear from 'rollup-plugin-clear' import image from 'rollup-plugin-image-file' type ExternalFn = (arr: Array) => Array @@ -91,7 +90,6 @@ export const build = async (projectConfig, componentConfig: IComponentConfig) => // @ts-ignore react native 相关的一些库中可能包含 jsx 语法 acornInjectPlugins: [jsx()], plugins: [ - clear({ targets: [output] }), // TODO: 使用 react-native-svg-transformer 处理 // @ts-ignore image({ @@ -155,7 +153,7 @@ function likeDependent (str: string) { return !str.match(/^\.?\.\//) && !path.isAbsolute(str) } -export default async function (projectPath: string, config: any) { +export default function (projectPath: string, config: any) { const { sourceRoot, entry, nativeComponents } = config const appPath = path.join(projectPath, sourceRoot, entry) const appConfig = getAppConfig(appPath) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1888c7b56bb8..6c5ec26bdb0d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1108,7 +1108,6 @@ importers: qrcode-terminal: ^0.12.0 react-is: ^16.13.0 react-native-root-siblings: ^4.1.1 - rollup-plugin-clear: ^2.0.7 rollup-plugin-image-file: ^1.0.2 dependencies: '@react-native-community/cli': registry.npmjs.org/@react-native-community/cli/7.0.3 @@ -1134,7 +1133,6 @@ importers: metro-resolver: registry.npmjs.org/metro-resolver/0.67.0 mime-types: registry.npmjs.org/mime-types/2.1.35 qrcode-terminal: registry.npmjs.org/qrcode-terminal/0.12.0 - rollup-plugin-clear: registry.npmjs.org/rollup-plugin-clear/2.0.7 rollup-plugin-image-file: registry.npmjs.org/rollup-plugin-image-file/1.0.2 devDependencies: expo-file-system: registry.npmjs.org/expo-file-system/14.0.0 @@ -19781,21 +19779,6 @@ packages: debug: optional: true - registry.npmjs.org/follow-redirects/1.15.1_debug@4.3.4: - resolution: {integrity: sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz} - id: registry.npmjs.org/follow-redirects/1.15.1 - name: follow-redirects - version: 1.15.1 - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - dependencies: - debug: registry.npmjs.org/debug/4.3.4_supports-color@6.1.0 - dev: false - registry.npmjs.org/fontfaceobserver/2.3.0: resolution: {integrity: sha512-6FPvD/IVyT4ZlNe7Wcn5Fb/4ChigpucKYSvD6a+0iMoLn2inpo711eyIcKjmDtE5XNcgAkSH9uN/nfAeZzHEfg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/fontfaceobserver/-/fontfaceobserver-2.3.0.tgz} name: fontfaceobserver @@ -21474,7 +21457,7 @@ packages: engines: {node: '>=8.0.0'} dependencies: eventemitter3: registry.npmjs.org/eventemitter3/4.0.7 - follow-redirects: registry.npmjs.org/follow-redirects/1.15.1_debug@4.3.4 + follow-redirects: registry.npmjs.org/follow-redirects/1.15.1 requires-port: registry.npmjs.org/requires-port/1.0.0 transitivePeerDependencies: - debug @@ -31592,14 +31575,6 @@ packages: semver-compare: registry.npmjs.org/semver-compare/1.0.0 sprintf-js: registry.npmjs.org/sprintf-js/1.1.2 - registry.npmjs.org/rollup-plugin-clear/2.0.7: - resolution: {integrity: sha512-Hg8NC3JcJBO1ofgyQC0IACpyKn/yhHPGZ3C7R3ubNGWUXy9JXHQrewk4J4hVcZznw6SOKayLsaNae596Rwt8Vg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/rollup-plugin-clear/-/rollup-plugin-clear-2.0.7.tgz} - name: rollup-plugin-clear - version: 2.0.7 - dependencies: - rimraf: registry.npmjs.org/rimraf/2.7.1 - dev: false - registry.npmjs.org/rollup-plugin-copy/3.4.0: resolution: {integrity: sha512-rGUmYYsYsceRJRqLVlE9FivJMxJ7X6jDlP79fmFkL8sJs7VVMSVyA2yfyL+PGyO/vJs4A87hwhgVfz61njI+uQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/rollup-plugin-copy/-/rollup-plugin-copy-3.4.0.tgz} name: rollup-plugin-copy