Skip to content

Commit 32f5d14

Browse files
committed
chore: taro-platform-harmony-cpp rollup
1 parent d7a00f8 commit 32f5d14

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

packages/taro-platform-harmony-cpp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"dev": "pnpm run rollup -w",
3131
"ohpm-publish": "pnpm run tsx --files ./scripts/ohpm-publish",
3232
"remove:reference": "pnpm run tsx --files ./scripts/reference",
33-
"rollup": "rollup --config rollup.config.mts --configPlugin @rollup/plugin-typescript --bundleConfigAsCjs",
33+
"rollup": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
3434
"tsx": "ts-node --skipIgnore"
3535
},
3636
"dependencies": {

packages/taro-platform-harmony-cpp/rollup.config.mts renamed to packages/taro-platform-harmony-cpp/rollup.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { join } from 'node:path'
1+
import { dirname, join } from 'node:path'
2+
import { fileURLToPath } from 'node:url'
23

34
import common from '@rollup/plugin-commonjs'
45
import json from '@rollup/plugin-json'
@@ -9,7 +10,7 @@ import copy from 'rollup-plugin-copy'
910
import externals from 'rollup-plugin-node-externals'
1011
import ts from 'rollup-plugin-ts'
1112

12-
const cwd = __dirname
13+
const cwd = dirname(fileURLToPath(import.meta.url))
1314

1415
// 供 CLI 编译时使用的 Taro 插件入口
1516
const compileConfig: RollupOptions = {

packages/taro-platform-harmony-cpp/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import type { IHarmonyConfig } from '@tarojs/taro/types/compile'
1515
const argProjectPath = getProcessArg('lib')
1616
const argHapName = getProcessArg('hap')
1717

18+
export { HarmonyCPP }
19+
1820
export interface IOptions {
1921
useConfigName?: string
2022
/** @default "local" */

packages/taro-platform-harmony-cpp/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"esModuleInterop": true,
88
"experimentalDecorators": true,
99
"module": "ESNext",
10-
"moduleResolution": "node",
10+
"moduleResolution": "bundler",
1111
"noImplicitAny": false,
1212
"noUnusedLocals": true,
1313
"noUnusedParameters": true,
@@ -18,7 +18,7 @@
1818
"strictNullChecks": true,
1919
"target": "ES2021"
2020
},
21-
"include": ["./scripts", "./src", "./types", "./cpp/types", "./rollup.config.mts"],
21+
"include": ["./scripts", "./src", "./types", "./cpp/types", "./rollup.config.ts"],
2222
"ts-node": {
2323
"compilerOptions": {
2424
"forceConsistentCasingInFileNames": true,

0 commit comments

Comments
 (0)