diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 059390c3b..a48ed4ffc 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -38,5 +38,5 @@ jobs:
with:
url: |
https://cdn.jsdelivr.net/npm/@frak-labs/nexus-sdk@latest/dist/bundle/bundle.js
- https://cdn.jsdelivr.net/npm/@frak-labs/core-sdk@latest/dist/bundle/bundle.js
- https://cdn.jsdelivr.net/npm/@frak-labs/components@latest/dist/bundle/components.js
\ No newline at end of file
+ https://cdn.jsdelivr.net/npm/@frak-labs/core-sdk@latest/cdn/bundle.js
+ https://cdn.jsdelivr.net/npm/@frak-labs/components@latest/cdn/components.js
diff --git a/.gitignore b/.gitignore
index c4cea26b1..c263c54e0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,6 +28,7 @@ cdk.context.json
# production
build
dist
+cdn
# misc
.DS_Store
@@ -54,4 +55,4 @@ packages/wallet/next-env.d.ts
.idea
# Turbo tmp stuff
-.turbo
\ No newline at end of file
+.turbo
diff --git a/biome.json b/biome.json
index 1df76076f..a3a0831fe 100644
--- a/biome.json
+++ b/biome.json
@@ -7,6 +7,7 @@
"_types",
"dist",
"build",
+ "cdn",
"node_modules/**",
".sst/**",
".open-next/**",
diff --git a/example/vanilla-js/index.html b/example/vanilla-js/index.html
index 45638678a..9c5a4fb92 100644
--- a/example/vanilla-js/index.html
+++ b/example/vanilla-js/index.html
@@ -5,7 +5,7 @@
Example Vanilla JS
-
+
diff --git a/example/vanilla-js/vite.config.ts b/example/vanilla-js/vite.config.ts
index ba5ef85ca..3fed743fc 100644
--- a/example/vanilla-js/vite.config.ts
+++ b/example/vanilla-js/vite.config.ts
@@ -2,7 +2,7 @@ import { resolve } from "node:path";
import { defineConfig } from "vite";
const projectRootDir = resolve(__dirname);
-const bundleDir = resolve(projectRootDir, "../../sdk/components/dist/bundle");
+const bundleDir = resolve(projectRootDir, "../../sdk/components/cdn");
export default defineConfig({
server: {
diff --git a/sdk/components/README.md b/sdk/components/README.md
index fd2cb27d9..dd11c2d59 100644
--- a/sdk/components/README.md
+++ b/sdk/components/README.md
@@ -15,7 +15,7 @@ To have more info about how does it works under the hood, you can check [this](h
Add the following script tag to your HTML file:
```html
-
+
```
## Quick start
diff --git a/sdk/components/package.json b/sdk/components/package.json
index 0e443cbff..dc99b5340 100644
--- a/sdk/components/package.json
+++ b/sdk/components/package.json
@@ -31,10 +31,12 @@
"sideEffects": false,
"private": false,
"type": "module",
- "main": "dist/bundle/components.js",
"files": [
- "/dist"
+ "/dist",
+ "/cdn"
],
+ "main": "./cdn/components.js",
+ "browser": "./cdn/components.js",
"scripts": {
"lint": "biome lint .",
"format:check": "biome check .",
diff --git a/sdk/components/tsup.config.ts b/sdk/components/tsup.config.ts
index e47aabfb6..c860168de 100644
--- a/sdk/components/tsup.config.ts
+++ b/sdk/components/tsup.config.ts
@@ -5,7 +5,7 @@ export default defineConfig([
target: "es2022",
// All of our entry-points
entry: ["src/components.ts"],
- outDir: "dist/bundle",
+ outDir: "cdn",
outExtension() {
return {
js: ".js",
diff --git a/sdk/core/package.json b/sdk/core/package.json
index e28c4e365..f9116daf5 100644
--- a/sdk/core/package.json
+++ b/sdk/core/package.json
@@ -30,8 +30,10 @@
"private": false,
"type": "module",
"files": [
- "/dist"
+ "/dist",
+ "/cdn"
],
+ "browser": "./cdn/bundle.js",
"exports": {
".": {
"import": {
diff --git a/sdk/core/src/bundle.ts b/sdk/core/src/bundle.ts
new file mode 100644
index 000000000..e1d910265
--- /dev/null
+++ b/sdk/core/src/bundle.ts
@@ -0,0 +1,3 @@
+export * from "./index";
+export * from "./actions";
+export * from "./interactions";
diff --git a/sdk/core/src/bundle/bundle.ts b/sdk/core/src/bundle/bundle.ts
deleted file mode 100644
index e6405a705..000000000
--- a/sdk/core/src/bundle/bundle.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from "../index";
-export * from "../actions";
-export * from "../interactions";
diff --git a/sdk/core/tsup.config.ts b/sdk/core/tsup.config.ts
index 18c4d440c..3943e951b 100644
--- a/sdk/core/tsup.config.ts
+++ b/sdk/core/tsup.config.ts
@@ -25,8 +25,8 @@ export default defineConfig([
{
target: "es2022",
// All of our entry-points
- entry: ["src/bundle/bundle.ts"],
- outDir: "dist/bundle",
+ entry: ["src/bundle.ts"],
+ outDir: "cdn",
outExtension() {
return {
js: ".js",
diff --git a/sdk/legacy/package.json b/sdk/legacy/package.json
index 537e3033c..55e18034d 100644
--- a/sdk/legacy/package.json
+++ b/sdk/legacy/package.json
@@ -32,7 +32,8 @@
"files": [
"/dist"
],
- "main": "dist/bundle/bundle.js",
+ "main": "./dist/bundle/bundle.js",
+ "browser": "./dist/bundle/bundle.js",
"scripts": {
"lint": "biome lint .",
"format:check": "biome check .",
diff --git a/sdk/react/package.json b/sdk/react/package.json
index 843550c70..045caa23d 100644
--- a/sdk/react/package.json
+++ b/sdk/react/package.json
@@ -32,8 +32,8 @@
"files": [
"/dist"
],
- "main": "dist/index.cjs",
- "types": "dist/index.d.cts",
+ "main": "./dist/index.cjs",
+ "types": "./dist/index.d.cts",
"exports": {
".": {
"import": {