mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-06 09:44:21 +01:00
bundle browser packages too in order to easily consume them without bundlers
This commit is contained in:
@@ -11,12 +11,16 @@
|
||||
"packageManager": "yarn@4.9.2",
|
||||
"files": [
|
||||
"dist/**",
|
||||
"bundle/**",
|
||||
"README.md"
|
||||
],
|
||||
"exports": {
|
||||
".": {
|
||||
"default": "./dist/promise-default.js"
|
||||
},
|
||||
"./bundle": {
|
||||
"default": "./bundle/main.es.js"
|
||||
},
|
||||
"./vite": {
|
||||
"development": "./dist/promise-vite-dev-hack.js",
|
||||
"default": "./dist/promise-default.js"
|
||||
@@ -30,12 +34,14 @@
|
||||
"@vitest/browser": "^3.2.4",
|
||||
"playwright": "^1.55.0",
|
||||
"typescript": "^5.9.2",
|
||||
"vite": "^7.1.5",
|
||||
"vitest": "^3.2.4"
|
||||
},
|
||||
"scripts": {
|
||||
"napi-build": "napi build --features browser --release --platform --target wasm32-wasip1-threads --no-js --manifest-path ../../Cargo.toml --output-dir . && rm index.d.ts sync.wasi* wasi* browser.js",
|
||||
"tsc-build": "npm exec tsc && cp sync.wasm32-wasi.wasm ./dist/sync.wasm32-wasi.wasm && WASM_FILE=sync.wasm32-wasi.wasm JS_FILE=./dist/wasm-inline.js node ../../../scripts/inline-wasm-base64.js",
|
||||
"build": "npm run napi-build && npm run tsc-build",
|
||||
"bundle": "vite build",
|
||||
"build": "npm run napi-build && npm run tsc-build && npm run bundle",
|
||||
"test": "VITE_TURSO_DB_URL=http://b--a--a.localhost:10000 CI=1 vitest --browser=chromium --run && VITE_TURSO_DB_URL=http://b--a--a.localhost:10000 CI=1 vitest --browser=firefox --run"
|
||||
},
|
||||
"napi": {
|
||||
|
||||
Reference in New Issue
Block a user