Skip to content

Commit

Permalink
Merge pull request #1761 from dubinc/fix-dub-embed
Browse files Browse the repository at this point in the history
Fix widget packages
  • Loading branch information
steven-tey authored Nov 29, 2024
2 parents a23d3f7 + 1a7bf04 commit 4770a47
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 57 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"prettier-check": "prettier --check \"**/*.{ts,tsx,md}\"",
"publish-cli": "turbo build --filter='@dub/cli' && cd packages/cli && npm publish && cd ../../",
"publish-embed": "turbo build --filter='@dub/embed-react' && cd packages/embeds/react && npm publish && cd ../../../",
"publish-embed-core": "turbo build --filter='@dub/embed-core' && cd packages/embeds/core && npm publish && cd ../../../",
"publish-embed-react": "turbo build --filter='@dub/embed-react' && cd packages/embeds/react && npm publish && cd ../../../",
"publish-tw": "turbo build --filter='@dub/tailwind-config' && cd packages/tailwind-config && npm publish && cd ../../",
"publish-ui": "turbo build --filter='@dub/ui' && cd packages/ui && npm publish && cd ../../",
"publish-utils": "turbo build --filter='@dub/utils' && cd packages/utils && npm publish && cd ../../",
Expand Down
2 changes: 2 additions & 0 deletions packages/embeds/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"version": "0.0.1",
"sideEffects": false,
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist/**"
],
Expand Down
10 changes: 5 additions & 5 deletions packages/embeds/core/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { defineConfig, Options } from "tsup";
import { defineConfig } from "tsup";

export default defineConfig((options: Options) => ({
clean: true,
export default defineConfig({
entry: {
"embed/script": "src/embed.ts", // Standalone entry for embed.ts
index: "src/index.ts", // Entry for all other files via index.ts
Expand All @@ -14,5 +13,6 @@ export default defineConfig((options: Options) => ({
},
dts: true,
minify: true,
...options,
}));
clean: true,
splitting: false,
});
6 changes: 3 additions & 3 deletions packages/embeds/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dub/embed-react",
"description": "Embed React components for Dub.",
"version": "0.0.1",
"version": "0.0.3",
"sideEffects": false,
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand All @@ -21,6 +21,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@dub/embed-core": "workspace:*",
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.14",
"autoprefixer": "^10.4.16",
Expand All @@ -32,8 +33,7 @@
},
"dependencies": {
"class-variance-authority": "^0.7.0",
"vite": "5.2.9",
"@dub/embed-core": "workspace:*"
"vite": "5.2.9"
},
"author": "Steven Tey <[email protected]>",
"homepage": "https://dub.co",
Expand Down
13 changes: 6 additions & 7 deletions packages/embeds/react/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { defineConfig, Options } from "tsup";
import { defineConfig } from "tsup";

export default defineConfig((options: Options) => ({
entry: {
index: "src/index.ts", // Entry for all other files via index.ts
},
export default defineConfig({
entry: ["src/index.ts"],
format: ["esm", "cjs"],
esbuildOptions(options) {
options.banner = {
Expand All @@ -18,5 +16,6 @@ export default defineConfig((options: Options) => ({
dts: true,
minify: true,
external: ["react"],
...options,
}));
clean: true,
splitting: false,
});
46 changes: 5 additions & 41 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4770a47

Please sign in to comment.