Skip to content

Commit 3ffe3b8

Browse files
ZEJIA-LIUliuzejia
andauthored
feat: 为jd小程序平台补充 editor 组件 (#16166)
Co-authored-by: liuzejia <[email protected]>
1 parent ea3bd24 commit 3ffe3b8

File tree

9 files changed

+27
-2
lines changed

9 files changed

+27
-2
lines changed

packages/taro-platform-alipay/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"@tarojs/shared": "workspace:*"
3636
},
3737
"peerDependencies": {
38+
"@tarojs/components": "workspace:*",
3839
"@tarojs/service": "workspace:*",
3940
"@tarojs/shared": "workspace:*"
4041
}

packages/taro-platform-jd/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@
3131
},
3232
"devDependencies": {
3333
"@tarojs/service": "workspace:*",
34-
"@tarojs/shared": "workspace:*"
34+
"@tarojs/shared": "workspace:*",
35+
"@tarojs/components": "workspace:*"
3536
},
3637
"peerDependencies": {
38+
"@tarojs/components": "workspace:*",
3739
"@tarojs/service": "workspace:*",
3840
"@tarojs/shared": "workspace:*"
3941
}

packages/taro-platform-jd/rollup.config.mjs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,15 @@ const runtimeUtilsConfig = {
5050
...base
5151
}
5252

53-
export default [compileConfig, runtimeConfig, runtimeUtilsConfig]
53+
// React 下 webpack 会 alias @tarojs/components 为此文件
54+
const otherConfig = {
55+
input: path.join(cwd, 'src/components-react.ts'),
56+
output: {
57+
file: path.join(cwd, 'dist/components-react.js'),
58+
format: 'es',
59+
sourcemap: true
60+
},
61+
...base
62+
}
63+
64+
export default [compileConfig, runtimeConfig, runtimeUtilsConfig, otherConfig]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// For React.createElement's type
2+
export * from '@tarojs/components/mini'
3+
export const Editor = 'editor'
4+

packages/taro-platform-jd/src/program.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default class JD extends TaroPlatformBase {
99
platform = 'jd'
1010
globalObject = 'jd'
1111
projectConfigJson = 'project.jd.json'
12+
taroComponentsPath = `${PACKAGE_NAME}/dist/components-react`
1213
runtimePath = `${PACKAGE_NAME}/dist/runtime`
1314
fileType = {
1415
templ: '.jxml',

packages/taro-platform-swan/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"@tarojs/shared": "workspace:*"
3636
},
3737
"peerDependencies": {
38+
"@tarojs/components": "workspace:*",
3839
"@tarojs/service": "workspace:*",
3940
"@tarojs/shared": "workspace:*"
4041
}

packages/taro-platform-tt/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"@tarojs/shared": "workspace:*"
3636
},
3737
"peerDependencies": {
38+
"@tarojs/components": "workspace:*",
3839
"@tarojs/shared": "workspace:*",
3940
"@tarojs/service": "workspace:*"
4041
}

packages/taro-platform-weapp/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@tarojs/shared": "workspace:*"
3535
},
3636
"peerDependencies": {
37+
"@tarojs/components": "workspace:*",
3738
"@tarojs/service": "workspace:*",
3839
"@tarojs/shared": "workspace:*"
3940
}

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)