mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
* Restructure the repository * lock file * fmt * fix bench * fix cli template test * remove accidental file * fix mv command * clippy * upgrade paths-filter github action * fix cli migration tests * lockfile * license headers * clippy * scope test-core to tauri crate * license header * correct --manifest-path usage * lockfile * fix tauri-driver on macOS [skip ci] * build target ios * try downgrade env_logger * downgrade 0.1.7 * try to fix bench * bench overflow * revert overflow fix, fix tauri_root_path * revert env_logger downgrade * fmt * raise msrv to 1.71 * fmt * delete .cargo/config.toml [skip ci] --------- Co-authored-by: Lucas Nogueira <lucas@tauri.app>
32 lines
678 B
JavaScript
32 lines
678 B
JavaScript
import { readFileSync } from 'fs'
|
|
import { join } from 'path'
|
|
import { cwd } from '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: `./${pkg.exports.import.split('/')[0]}`
|
|
})
|
|
],
|
|
external: [
|
|
/^@tauri-apps\/api/,
|
|
...Object.keys(pkg.dependencies || {}),
|
|
...Object.keys(pkg.peerDependencies || {})
|
|
]
|
|
}
|