mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-21 06:58:47 -05:00
[AI] Address review feedback for browser API build
- Remove `internal` export from index.web.ts (keep as local variable) - Use `yarn build:node && yarn build:browser` in build script - Remove unnecessary `node:` external from vite.browser.config.ts (Vite handles browser externalization automatically) https://claude.ai/code/session_01MnxRXLNjqXrVb5CdsC85Fb
This commit is contained in:
@@ -4,8 +4,7 @@ import type { InitConfig, lib } from '@actual-app/core/server/main';
|
||||
export * from './methods';
|
||||
export * as utils from './utils';
|
||||
|
||||
/** @deprecated Please use return value of `init` instead */
|
||||
export let internal: typeof lib | null = null;
|
||||
let internal: typeof lib | null = null;
|
||||
|
||||
export async function init(config: InitConfig = {}) {
|
||||
internal = await initLootCore(config);
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "vite build && vite build --config vite.browser.config.ts",
|
||||
"build": "yarn build:node && yarn build:browser",
|
||||
"build:node": "vite build",
|
||||
"build:browser": "vite build --config vite.browser.config.ts",
|
||||
"test": "vitest --run",
|
||||
|
||||
@@ -16,12 +16,6 @@ export default defineConfig({
|
||||
formats: ['es'],
|
||||
fileName: () => 'browser.js',
|
||||
},
|
||||
rollupOptions: {
|
||||
external: [
|
||||
// These are browser APIs provided by the environment
|
||||
/^node:/,
|
||||
],
|
||||
},
|
||||
},
|
||||
plugins: [peggyLoader()],
|
||||
resolve: {
|
||||
|
||||
Reference in New Issue
Block a user