Skip to content

Commit

Permalink
Add missing .js extension to export in "jsx-dev-runtime.js" (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
volkanceylan authored Dec 22, 2024
1 parent 6e0e7e8 commit 4855273
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,9 @@ export async function build({ targetDir, format, packageName }: BuildOptions) {
fs.writeFile(
resolve(OUT_DIR, "jsx-dev-runtime.js"),
format === "esm"
? /* javascript */ `export * from "./jsx-runtime";`
? /* javascript */ `export * from "./jsx-runtime.js";`
: /* javascript */ `module.exports = require("./jsx-runtime");`
),

buildRollup("styled.macro", {
moduleFormat: "cjs",
cjsExtension: true,
Expand All @@ -155,9 +154,10 @@ export async function build({ targetDir, format, packageName }: BuildOptions) {
outputDir: OUT_DIR_MIN,
inject: { "./jsx-dom": `${packageName}/min`, delimiters: ["", ""] },
}),
reexport("jsx-dev-runtime.js", OUT_DIR_MIN, "./jsx-runtime.js"),
reexport("index.d.ts", OUT_DIR_MIN, "../index"),
reexport("jsx-runtime.d.ts", OUT_DIR_MIN, "./index", jsxRuntimeExports),
reexport("jsx-runtime.d.ts", OUT_DIR, "./index", jsxRuntimeExports),
reexport("jsx-runtime.d.ts", OUT_DIR, "./index", jsxRuntimeExports)
])
}

Expand Down

0 comments on commit 4855273

Please sign in to comment.