Skip to content

Commit

Permalink
^ vpk
Browse files Browse the repository at this point in the history
  • Loading branch information
LankyMoose committed Apr 13, 2024
1 parent 6e49596 commit e2eeed8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/vite-plugin-kaioken/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite-plugin-kaioken",
"version": "0.3.2",
"version": "0.3.3",
"description": "",
"main": "dist/index.js",
"type": "module",
Expand Down
14 changes: 12 additions & 2 deletions packages/vite-plugin-kaioken/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,22 @@ export default function (
let isProduction = false
let isBuild = false

const kaiokenModuleId = require
let kaiokenModuleId = require
.resolve("kaioken", {
paths: [process.cwd()],
})
.replace(/\\/g, "/")
.replace("index.js", "dist/index.js")
if (kaiokenModuleId.endsWith("/lib/index.js")) {
kaiokenModuleId = kaiokenModuleId.replace(
"/lib/index.js",
"/lib/dist/index.js"
)
}

console.log(
"[vite-plugin-kaioken]: resolved kaioken module id",
kaiokenModuleId
)

return {
name: "vite-plugin-kaioken",
Expand Down

0 comments on commit e2eeed8

Please sign in to comment.