Skip to content

Commit

Permalink
fix(rn): 编译组件时移除 clear dist 操作 fix #12183 (#12198)
Browse files Browse the repository at this point in the history
* fix(rn): 编译组件时移除 clear dist 操作 fix #12183

* chore(deps): pnpm.lock

Co-authored-by: 早道 <[email protected]>
  • Loading branch information
biorz and shinken008 authored Aug 3, 2022
1 parent 53acfc5 commit f7541d4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
1 change: 0 additions & 1 deletion packages/taro-rn-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 1 addition & 3 deletions packages/taro-rn-runner/src/config/build-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string | RegExp>) => Array<string | RegExp>
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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)
Expand Down
27 changes: 1 addition & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f7541d4

Please sign in to comment.