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

Use esbuild Instead of Snowpack (and fix build error) #530

Merged
merged 5 commits into from
Jul 20, 2024

Conversation

amarzot-lowell-instruments
Copy link
Contributor

Got a new build system in place to replace Snowpack. It was failing to build so I fixed the build, and then moved to esbuild.

fixes #526
fixes #512
fixes #526
fixes #513
(many of these are duplicates)

@butlerx
Copy link
Owner

butlerx commented Jul 1, 2024

thanks for the PR the project uses pnpm for lock file so could you remove the package-lock.json and update the lockfile

Used corepack to install the latest pnpm, and regenerated the lock file.
Removed the npm lock file. Husky v4 was not playing nicely with the
latest pnpm, so I updated husky to the latest version and moved the
pre-commit hook to .husky/pre-commit as v9 expects.
@amarzot-lowell-instruments
Copy link
Contributor Author

I've never used pnpm or corepack before, so let me know if anything is out of place. I think it should be correct though. Had to update husky as v4 was quite old and didn't work with pnpm. Thanks for taking a look at the PR

@amarzot-lowell-instruments amarzot-lowell-instruments marked this pull request as draft July 2, 2024 02:04
@amarzot-lowell-instruments
Copy link
Contributor Author

Just realized I need to use pnpm in some more places, holding off on this for a sec.

* Using plugins for esbuild:
    - esbuild-plugin-copy
    - esbuild-sass-plugin
    - custom plugin to run tsc
* Upgraded concurrently and nodemon to latest versions.
* Updated package.json dev script:
    - use pnpm
    - nodemon: only watch build dir and config
    - use --raw to get colors
* Don't serve 'assets' path (it no longer exists).
* Streamline html.ts route and use new build paths. Only need to import
  one css file as it is being bundled.
* Update other middleware to use new paths
@amarzot-lowell-instruments amarzot-lowell-instruments marked this pull request as ready for review July 4, 2024 01:12
@amarzot-lowell-instruments
Copy link
Contributor Author

Okay, made a bunch of changes and started using esbuild in a better way. Important changes are called out in the commit message.

Let me know if you want anything else changed

@amarzot-lowell-instruments
Copy link
Contributor Author

amarzot-lowell-instruments commented Jul 19, 2024

@butlerx Anything I can do to help this PR move forward? Would be nice to use the fixes from 2.7.0

Copy link
Owner

@butlerx butlerx left a comment

Choose a reason for hiding this comment

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

Sorry forgot about this PR.
I'm not an expert on esbuild but the change looks good

@butlerx butlerx merged commit 643e88b into butlerx:main Jul 20, 2024
3 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants