Skip to content

Commit

Permalink
devtools now bundles kaioken - fixes issue between dev / deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
LankyMoose committed Apr 14, 2024
1 parent 7d62023 commit 8a1b50f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions packages/devtools-host/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useRef, useEffect } from "kaioken"
import { useDevtoolsStore } from "./store"

function handleDragOver(e: DragEvent) {
Expand Down
2 changes: 2 additions & 0 deletions packages/devtools-host/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { mount } from "kaioken"
import App from "./App"
import { type AnchorCorner, useDevtoolsStore } from "./store"
console.log("__dt")
;(() => {
if ("window" in globalThis) {
//@ts-ignore
Expand Down
4 changes: 2 additions & 2 deletions packages/devtools-host/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const options: BuildOptions = {
target: "es2020",
format: "esm",

external: ["kaioken"],
// external: ["kaioken"],
write: false,
}

Expand All @@ -20,7 +20,7 @@ export function writeFile(content: string) {
fs.mkdirSync("dist")
fs.writeFileSync(
"dist/index.js",
`export default \`${content.replace(/[`\\$]/g, "\\$&")}\``,
`export default \`(() => {\n${content.replace(/[`\\$]/g, "\\$&")}\n})()\``,
{
encoding: "utf-8",
}
Expand Down
2 changes: 2 additions & 0 deletions packages/devtools-host/src/store.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { createStore } from "kaioken"

export type AnchorCorner = "br" | "bl" | "tl" | "tr"

let initialCorner = "br"
Expand Down
7 changes: 0 additions & 7 deletions packages/devtools-host/src/types.d.ts

This file was deleted.

0 comments on commit 8a1b50f

Please sign in to comment.