Skip to content

Commit

Permalink
Fix umd build
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexagon committed Oct 7, 2024
1 parent e003c5a commit 9139a16
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions build/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const baseConfig = {
declarations: true,
compilerOptions: {
//@ts-ignore outDir is valid
allowImportingTsExtensions: true,
outDir: resolvedDistPath,
},
},
Expand All @@ -39,10 +40,12 @@ const buildConfigs = [
},
{
...baseConfig,
entryPoints: [resolve(relativeProjectRoot, "src", "base64.default.ts")],
outfile: resolve(resolvedDistPath, "base64.umd.js"),
platform: "browser",
format: "iife",
globalName: "base64",
plugins: []
},
{
...baseConfig,
Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hexagon/base64",
"version": "2.0.0",
"version": "2.0.1",
"exports": "./src/base64.ts",
"lint": {
"include": ["src", "test", "build"]
Expand Down
2 changes: 2 additions & 0 deletions src/base64.default.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { base64 } from "./base64.ts";
export default base64;
3 changes: 1 addition & 2 deletions src/base64.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,4 @@ const base64 = {
},
};

export default base64;
export { base64 };
export { base64 };

0 comments on commit 9139a16

Please sign in to comment.