Files
tauri-plugin-bluclas/rollup.config.js
T
rizky_denianto 00aa5a8526
Penerbitan Plugin / persiapan (pull_request) Successful in 35s
Penerbitan Plugin / penerbitan (pull_request) Successful in 4m4s
Coba memperbaiki tipe data yang tidak terdeteksi di js
2026-09-06 11:38:43 +07:00

33 lines
717 B
JavaScript

import { readFileSync } from 'node:fs'
import { dirname, join } from 'node:path'
import { cwd } from 'node:process'
import typescript from '@rollup/plugin-typescript'
const pkg = JSON.parse(readFileSync(join(cwd(), 'package.json'), 'utf8'))
export default {
input: 'guest-js/index.ts',
output: [
{
file: pkg.exports.import,
format: 'esm'
},
{
file: pkg.exports.require,
format: 'cjs'
}
],
plugins: [
typescript({
declaration: true,
declarationDir: dirname(pkg.exports.import),
rootDir: 'guest-js'
})
],
external: [
/^@tauri-apps\/api/,
...Object.keys(pkg.dependencies || {}),
...Object.keys(pkg.peerDependencies || {})
]
}