mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
fix(api): distribution (#1582)
Co-authored-by: Amr Bashir <48618675+amrbashir@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7506a52844
commit
7f998d08e3
5
.changes/api-package-fix.md
Normal file
5
.changes/api-package-fix.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"api": patch
|
||||
---
|
||||
|
||||
Fixes distribution of the `@tauri-apps/api` package for older bundlers.
|
||||
@@ -2,30 +2,71 @@
|
||||
"name": "@tauri-apps/api",
|
||||
"version": "1.0.0-beta-rc.2",
|
||||
"description": "Tauri API definitions",
|
||||
"main": "./index.js",
|
||||
"typings": "./index.d.ts",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./index.js",
|
||||
"./app": "./app.js",
|
||||
"./cli": "./cli.js",
|
||||
"./dialog": "./dialog.js",
|
||||
"./event": "./event.js",
|
||||
"./updater": "./updater.js",
|
||||
"./fs": "./fs.js",
|
||||
"./path": "./path.js",
|
||||
"./http": "./http.js",
|
||||
"./notification": "./notification.js",
|
||||
"./tauri": "./tauri.js",
|
||||
"./window": "./window.js",
|
||||
"./shell": "./shell.js",
|
||||
"./globalShortcut": "./globalShortcut.js"
|
||||
".": {
|
||||
"import": "./index.js",
|
||||
"require": "./index.cjs"
|
||||
},
|
||||
"./app": {
|
||||
"import": "./app.js",
|
||||
"require": "./app.cjs"
|
||||
},
|
||||
"./cli": {
|
||||
"import": "./cli.js",
|
||||
"require": "./cli.cjs"
|
||||
},
|
||||
"./dialog": {
|
||||
"import": "./dialog.js",
|
||||
"require": "./dialog.cjs"
|
||||
},
|
||||
"./event": {
|
||||
"import": "./event.js",
|
||||
"require": "./event.cjs"
|
||||
},
|
||||
"./updater": {
|
||||
"import": "./updater.js",
|
||||
"require": "./updater.cjs"
|
||||
},
|
||||
"./fs": {
|
||||
"import": "./fs.js",
|
||||
"require": "./fs.cjs"
|
||||
},
|
||||
"./path": {
|
||||
"import": "./path.js",
|
||||
"require": "./path.cjs"
|
||||
},
|
||||
"./http": {
|
||||
"import": "./http.js",
|
||||
"require": "./http.cjs"
|
||||
},
|
||||
"./notification": {
|
||||
"import": "./notification.js",
|
||||
"require": "./notification.cjs"
|
||||
},
|
||||
"./window": {
|
||||
"import": "./window.js",
|
||||
"require": "./window.cjs"
|
||||
},
|
||||
"./shell": {
|
||||
"import": "./shell.js",
|
||||
"require": "./shell.cjs"
|
||||
},
|
||||
"./globalShortcut": {
|
||||
"import": "./globalShortcut.js",
|
||||
"require": "./globalShortcut.cjs"
|
||||
},
|
||||
"./tauri": {
|
||||
"import": "./tauri.js",
|
||||
"require": "./tauri.cjs"
|
||||
}
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/tauri"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rimraf ./dist && rollup -c --silent && copyfiles package.json LICENSE* CHANGELOG.md dist",
|
||||
"build": "rimraf ./dist && rollup -c --silent && copyfiles -f package.json LICENSE* CHANGELOG.md src/*.ts dist && copyfiles -f src/helpers/*.ts dist/helpers",
|
||||
"npm-pack": "yarn build && cd ./dist && npm pack",
|
||||
"npm-publish": "yarn build && cd ./dist && yarn publish --access public --loglevel silly",
|
||||
"lint": "eslint --ext ts \"./src/**/*.ts\"",
|
||||
|
||||
@@ -34,14 +34,14 @@ export default [
|
||||
output: [
|
||||
{
|
||||
dir: 'dist/',
|
||||
entryFileNames: '[name].js',
|
||||
entryFileNames: '[name].cjs',
|
||||
format: 'cjs',
|
||||
exports: 'named',
|
||||
globals: {}
|
||||
},
|
||||
{
|
||||
dir: 'dist/',
|
||||
entryFileNames: '[name].mjs',
|
||||
entryFileNames: '[name].js',
|
||||
format: 'esm',
|
||||
exports: 'named',
|
||||
globals: {}
|
||||
|
||||
Reference in New Issue
Block a user