FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Release v1.3.0 by bigorn0 · Pull Request #26 · hackolade/fetch · GitHub

Release v1.3.0 - #26

Merged
thomas-jakemeyn merged 8 commits into
developfrom
dedicated-browser-entrypoint
May 14, 2025
Merged

Release v1.3.0#26
thomas-jakemeyn merged 8 commits into
developfrom
dedicated-browser-entrypoint

Conversation

bigorn0 commented May 13, 2025
edited by thomas-jakemeyn
Loading

Copy link
Copy Markdown
Contributor

Content

Fixed

  • Migrated from SWC to esbuild in order to generate a dedicated entrypoint for browser deployments without any reference to Electron

bigorn0 changed the title Switch to using esbuild in order to allow customizing the build for t… Switch to using esbuild in order to allow customizing the build for the browser May 13, 2025
Comment thread package.json Outdated
"build:esm": "swc ./src -d ./dist/esm --ignore **/*.d.ts --strip-leading-paths -C module.type=es6 -C module.ignoreDynamic=true",
"build:cjs": "swc ./src -d ./dist/cjs --ignore **/*.d.ts --strip-leading-paths -C module.type=commonjs -C module.ignoreDynamic=true",
"build": "npm run build:cjs && npm run build:esm && npm run build:esm:package",
"build:esm": "npx esbuild ./src/index.ts --bundle --format=esm --tree-shaking=true --minify --outdir=./dist/esm --format=esm --platform=node --define:BROWSER_BUILD=false --external:electron",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Maybe at this stage having an esbuild config might be a good idea...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

What about defining a NPM script with all common parameters? Something like this:

"esbuild": "npx esbuild ./src/index.ts --bundle --tree-shaking=true --minify --external:electron",
"build:esm": "npm run esbuild -- --format=esm --outdir=./dist/esm --define:BROWSER_BUILD=false",
"build:cjs": "npm run esbuild -- --format=cjs --outdir=./dist/cjs --define:BROWSER_BUILD=false",
"build:browser": "npm run esbuild -- --format=esm --outdir=./dist/browser --define:BROWSER_BUILD=true",

Comment thread src/hckFetch.ts
bigorn0 marked this pull request as ready for review May 13, 2025 10:51
Comment thread package.json Outdated
Comment thread package.json Outdated
"build:esm": "swc ./src -d ./dist/esm --ignore **/*.d.ts --strip-leading-paths -C module.type=es6 -C module.ignoreDynamic=true",
"build:cjs": "swc ./src -d ./dist/cjs --ignore **/*.d.ts --strip-leading-paths -C module.type=commonjs -C module.ignoreDynamic=true",
"build": "npm run build:cjs && npm run build:esm && npm run build:esm:package",
"build:esm": "npx esbuild ./src/index.ts --bundle --format=esm --tree-shaking=true --minify --outdir=./dist/esm --format=esm --platform=node --define:BROWSER_BUILD=false --external:electron",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

What about defining a NPM script with all common parameters? Something like this:

"esbuild": "npx esbuild ./src/index.ts --bundle --tree-shaking=true --minify --external:electron",
"build:esm": "npm run esbuild -- --format=esm --outdir=./dist/esm --define:BROWSER_BUILD=false",
"build:cjs": "npm run esbuild -- --format=cjs --outdir=./dist/cjs --define:BROWSER_BUILD=false",
"build:browser": "npm run esbuild -- --format=esm --outdir=./dist/browser --define:BROWSER_BUILD=true",

Comment thread package.json Outdated
"build:cjs": "swc ./src -d ./dist/cjs --ignore **/*.d.ts --strip-leading-paths -C module.type=commonjs -C module.ignoreDynamic=true",
"build": "npm run build:cjs && npm run build:esm && npm run build:esm:package",
"esbuild": "npx esbuild ./src/index.ts --bundle --tree-shaking=true --minify --external:electron",
"build:esm": "npm run esbuild -- --format=esm --outdir=./dist/esm --format=esm --platform=node --define:BROWSER_BUILD=false",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
"build:esm": "npm run esbuild -- --format=esm --outdir=./dist/esm --format=esm --platform=node --define:BROWSER_BUILD=false",
"build:esm": "npm run esbuild -- --format=esm --outdir=./dist/esm --platform=node --define:BROWSER_BUILD=false",

Comment thread package.json Outdated
"build": "npm run build:cjs && npm run build:esm && npm run build:esm:package",
"esbuild": "npx esbuild ./src/index.ts --bundle --tree-shaking=true --minify --external:electron",
"build:esm": "npm run esbuild -- --format=esm --outdir=./dist/esm --format=esm --platform=node --define:BROWSER_BUILD=false",
"build:cjs": "npm run esbuild -- --format=cjs --outdir=./dist/cjs --format=cjs --platform=node --define:BROWSER_BUILD=false",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
"build:cjs": "npm run esbuild -- --format=cjs --outdir=./dist/cjs --format=cjs --platform=node --define:BROWSER_BUILD=false",
"build:cjs": "npm run esbuild -- --format=cjs --outdir=./dist/cjs --platform=node --define:BROWSER_BUILD=false",

bigorn0 changed the title Switch to using esbuild in order to allow customizing the build for the browser Release v1.3.0 May 14, 2025
thomas-jakemeyn merged commit 1a9a663 into develop May 14, 2025
thomas-jakemeyn deleted the dedicated-browser-entrypoint branch May 14, 2025 10:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL