File tree Expand file tree Collapse file tree 8 files changed +514
-311
lines changed Expand file tree Collapse file tree 8 files changed +514
-311
lines changed Original file line number Diff line number Diff line change 156
156
"stylelint-order" : " ^6.0.4" ,
157
157
"ts-jest" : " ^29.1.2" ,
158
158
"ts-node" : " ^10.9.1" ,
159
- "typescript " : " ~5.4.5 " ,
159
+ "tsdown " : " ^0.12.1 " ,
160
160
"tslib" : " ^2.6.2" ,
161
+ "typescript" : " ~5.4.5" ,
161
162
"vitest" : " ^1.6.0"
162
163
},
163
164
"pnpm" : {
Original file line number Diff line number Diff line change 1
1
// 由 getLibList.js 脚本生成, 不要进行手动修改, 请不要手动修改
2
- export * from './ENV_TYPE'
3
2
export * from './arrayBufferToBase64'
4
3
export * from './authorize'
5
4
export * from './base64ToArrayBuffer'
@@ -16,6 +15,7 @@ export * from './createInnerAudioContext'
16
15
export * from './createSelectorQuery'
17
16
export * from './createVideoContext'
18
17
export * from './downloadFile'
18
+ export * from './ENV_TYPE'
19
19
export * from './getAppBaseInfo'
20
20
export * from './getClipboardData'
21
21
export * from './getEnv'
Original file line number Diff line number Diff line change 1
- const path = require ( 'path' )
1
+ import path from 'node:path'
2
+ import { fileURLToPath } from 'node:url'
2
3
3
- module . exports = {
4
+ const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) )
5
+
6
+ export default {
4
7
globals : {
5
8
ENABLE_INNER_HTML : true ,
6
9
ENABLE_ADJACENT_HTML : true ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @tarojs/runtime" ,
3
+ "type" : " module" ,
3
4
"version" : " 4.1.1" ,
4
5
"description" : " taro runtime for mini apps." ,
5
6
"author" : " O2Team" ,
16
17
" ./dist/dom-external/index.js"
17
18
],
18
19
"scripts" : {
19
- "prod" : " pnpm run build" ,
20
- "prebuild" : " pnpm run clean" ,
21
- "build" : " pnpm run rollup --environment NODE_ENV:production" ,
22
- "clean" : " rimraf ./dist" ,
23
- "dev" : " pnpm run rollup --environment NODE_ENV:development -w" ,
24
- "rollup" : " rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript" ,
20
+ "prod" : " tsdown" ,
21
+ "build" : " tsdown" ,
22
+ "dev" : " tsdown -w" ,
25
23
"test" : " jest" ,
26
24
"test:ci" : " jest --ci -i --coverage --silent"
27
25
},
37
35
"tslib" : " ^2.6.2"
38
36
},
39
37
"devDependencies" : {
40
- "@rollup/plugin-typescript" : " ^12.1.2" ,
41
38
"@types/react" : " ^18.2.79" ,
42
39
"@vue/runtime-core" : " ^3.4.23" ,
43
40
"lodash" : " ^4.17.21" ,
44
- "react" : " ^18.2.0" ,
45
- "rollup" : " ^4.37.0" ,
46
- "rollup-plugin-ts" : " ^3.4.5"
41
+ "react" : " ^18.2.0"
47
42
}
48
43
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 7
7
"outDir" : " ./dist" ,
8
8
"target" : " ES2017"
9
9
},
10
- "include" : [" ./src" , " ./rollup.config.ts " ],
10
+ "include" : [" ./src" ],
11
11
"exclude" : [" ./src/__tests__" ]
12
12
}
Original file line number Diff line number Diff line change
1
+ import { defineConfig } from 'tsdown'
2
+
3
+ export default [
4
+ defineConfig ( {
5
+ entry : 'src/**/*.ts' ,
6
+ treeshake : false ,
7
+ sourcemap : true ,
8
+ platform : 'neutral'
9
+ } ) ,
10
+ defineConfig ( {
11
+ entry : {
12
+ 'runtime.esm' : 'src/index.ts' ,
13
+ } ,
14
+ treeshake : false ,
15
+ sourcemap : true ,
16
+ platform : 'neutral'
17
+ } )
18
+ ]
You can’t perform that action at this time.
0 commit comments