Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion desktop/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ portfinder
})
.then((port) => {
const devServer = `./scripts/start-dev-with-auto-restart.sh --port ${port} --env platform=desktop`;
const buildMain = 'webpack watch --config config/webpack/webpack.desktop.ts --config-name desktop-main --mode=development';
const buildMain = 'npx tsx ./node_modules/.bin/webpack-cli watch --config config/webpack/webpack.desktop.ts --config-name desktop-main --mode=development';

const env = {
PORT: port,
Expand Down
44 changes: 44 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"web": "./scripts/set-pusher-suffix.sh && concurrently npm:web-proxy npm:web-server",
"web-proxy": "ts-node web/proxy.ts",
"web-server": "./scripts/start-dev-with-auto-restart.sh",
"build": "webpack --config config/webpack/webpack.common.ts --env file=.env.production && ts-node ./scripts/combine-web-sourcemaps.ts",
"build-staging": "webpack --config config/webpack/webpack.common.ts --env file=.env.staging && ts-node ./scripts/combine-web-sourcemaps.ts",
"build-adhoc": "webpack --config config/webpack/webpack.common.ts --env file=.env.adhoc && ts-node ./scripts/combine-web-sourcemaps.ts",
"build": "tsx ./node_modules/.bin/webpack-cli --config config/webpack/webpack.common.ts --env file=.env.production && tsx ./scripts/combine-web-sourcemaps.ts",
"build-staging": "tsx ./node_modules/.bin/webpack-cli --config config/webpack/webpack.common.ts --env file=.env.staging && tsx ./scripts/combine-web-sourcemaps.ts",
"build-adhoc": "tsx ./node_modules/.bin/webpack-cli --config config/webpack/webpack.common.ts --env file=.env.adhoc && tsx ./scripts/combine-web-sourcemaps.ts",
"desktop": "./scripts/set-pusher-suffix.sh && ts-node desktop/start.ts",
"desktop-build": "./scripts/build-desktop.sh production",
"desktop-build-staging": "./scripts/build-desktop.sh staging",
Expand Down Expand Up @@ -62,7 +62,7 @@
"storybook-build": "ENV=production storybook build -o dist/docs",
"storybook-build-staging": "ENV=staging storybook build -o dist/docs",
"gh-actions-build": "./.github/scripts/buildActions.sh",
"analyze-packages": "ANALYZE_BUNDLE=true webpack --config config/webpack/webpack.common.ts --env file=.env.production",
"analyze-packages": "ANALYZE_BUNDLE=true tsx ./node_modules/.bin/webpack-cli --config config/webpack/webpack.common.ts --env file=.env.production",
"symbolicate:android": "npx metro-symbolicate android/app/build/generated/sourcemaps/react/release/index.android.bundle.map",
"symbolicate:ios": "npx metro-symbolicate main.jsbundle.map",
"symbolicate-release:ios": "./scripts/release-profile.ts --platform=ios",
Expand Down Expand Up @@ -365,6 +365,7 @@
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsx": "4.21.0",
"type-fest": "4.35.0",
"typescript": "^5.9.2",
"typescript-eslint": "^8.45.0",
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-desktop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ title "Bundling Desktop js Bundle Using Webpack"
info " • ELECTRON_ENV: $ELECTRON_ENV"
info " • ENV file: $ENV_FILE"
info ""
NODE_OPTIONS=--max-old-space-size=8192 npx webpack --config config/webpack/webpack.desktop.ts --env file=$ENV_FILE
NODE_OPTIONS=--max-old-space-size=8192 npx tsx ./node_modules/.bin/webpack-cli --config config/webpack/webpack.desktop.ts --env file=$ENV_FILE

title "Combining web sourcemaps"
info ""
ts-node scripts/combine-web-sourcemaps.ts --path="desktop/dist/www"
tsx scripts/combine-web-sourcemaps.ts --path="desktop/dist/www"

title "Building Desktop App Archive Using Electron"
info ""
Expand Down
4 changes: 2 additions & 2 deletions scripts/start-dev-with-auto-restart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ run_wds () {
# Check if platform is Desktop to determine open behavior
if [[ "${WEBPACK_DEV_SERVER_ARGS[*]}" == *"--env platform=desktop"* ]]; then
# For Desktop, always use --no-open since app is handled by Electron
node --expose-gc ./node_modules/.bin/webpack-dev-server --no-open "${WEBPACK_DEV_SERVER_ARGS[@]}" --config config/webpack/webpack.dev.ts
npx tsx --expose-gc ./node_modules/.bin/webpack-cli serve --no-open "${WEBPACK_DEV_SERVER_ARGS[@]}" --config config/webpack/webpack.dev.ts
else
# For Web, use the provided open flag
node --expose-gc ./node_modules/.bin/webpack-dev-server "$1" "${WEBPACK_DEV_SERVER_ARGS[@]}" --config config/webpack/webpack.dev.ts
npx tsx --expose-gc ./node_modules/.bin/webpack-cli serve "$1" "${WEBPACK_DEV_SERVER_ARGS[@]}" --config config/webpack/webpack.dev.ts
fi
}

Expand Down
Loading