A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
fix(sdk): Publish both esm and cjs modules for the sdk
Mohamed Bassem838d30890a20
diff --git a/apps/cli/src/commands/bookmarks.ts b/apps/cli/src/commands/bookmarks.tsindex 52631d96..b6f7b2d3 100644--- a/apps/cli/src/commands/bookmarks.ts+++ b/apps/cli/src/commands/bookmarks.ts@@ -73,7 +73,10 @@ bookmarkCmdcollect<string>,[],)- .option("--title <title>", "if set, this will be used as the bookmark's title")+ .option(+ "--title <title>",+ "if set, this will be used as the bookmark's title",+ ).action(async (opts) => {const api = getAPIClient();diff --git a/packages/sdk/package.json b/packages/sdk/package.jsonindex 889d86a6..2cac16cf 100644--- a/packages/sdk/package.json+++ b/packages/sdk/package.json@@ -10,7 +10,9 @@],"main": "./src/index.ts","publishConfig": {- "exports": "./dist/index.mjs",+ "main": "./dist/index.js",+ "exports": "./dist/index.js",+ "module": "./dist/index.mjs","types": "./dist/index.d.ts"},"devDependencies": {diff --git a/packages/sdk/vite.config.mts b/packages/sdk/vite.config.mtsindex 0bcccbd2..e8e3c329 100644--- a/packages/sdk/vite.config.mts+++ b/packages/sdk/vite.config.mts@@ -6,13 +6,16 @@ import tsconfigPaths from "vite-tsconfig-paths";export default defineConfig({build: {+ lib: {+ entry: "src/index.ts",+ formats: ["es", "cjs"],+ fileName: (format) => `index.${format === "es" ? "mjs" : "js"}`,+ },rollupOptions: {- input: "src/index.ts",- output: {- dir: "dist",- },+ external: ["openapi-fetch"],},ssr: true,+ sourcemap: true,},plugins: [tsconfigPaths(), dts({ rollupTypes: true, copyDtsFiles: true })],});