Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upgrade ocular-dev-tools to tsc+esbuild #2897

Merged
merged 18 commits into from
Mar 7, 2024
Merged

Conversation

ibgreen
Copy link
Collaborator

@ibgreen ibgreen commented Feb 27, 2024

This upgrade brings a massive 10x performance increase for our builds.

@belom88 @dsavinov-actionengine

  • I suspect this may break publishing for a little while until we fix any issues.
  • I'd like to merge it as soon as possible - but want to make sure I don't block your work.

@Pessimistress
Copy link
Collaborator

Suggestions for testing local build:

  • run yarn bootstrap
  • in CLI, enter node and inspect:
    • import('@loaders.gl/core').then(console.log)
    • require('@loaders.gl/core')
  • go to modules/core, run yarn build-bundle. Create a temporary html file with <script src="dist.min.js"></script>, open in browser and inspect the global loaders object.

@ibgreen
Copy link
Collaborator Author

ibgreen commented Mar 5, 2024

Suggestions for testing local build:

Both these tests fail.

Also WASM loading seems to fail in CI, but not locally.

package.json Outdated Show resolved Hide resolved
@@ -44,8 +44,9 @@
"fs": false
},
"scripts": {
"pre-build": "npm run build-worker && npm run build-bundle && npm run build-bundle -- --env=dev && npm run build-triangulation-worker",
"build-bundle": "ocular-bundle ./src/index.ts",
"pre-build": "npm run build-worker && npm run build-bundle && npm run build-bundle-dev && npm run build-triangulation-worker",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should this be prepublishOnly everywhere? Or good to stick with pre-build? Efficient, but a bit uncanny that some builds only happen on publish.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Some packages require pre-build to run (copy of libs, build workers etc.)

@ibgreen ibgreen marked this pull request as ready for review March 7, 2024 16:28
@ibgreen ibgreen merged commit 2940e5f into master Mar 7, 2024
1 check passed
@ibgreen ibgreen deleted the ib/bump-ocular branch March 7, 2024 16:28
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