Skip to content

Build with Vite#1045

Open
binh-dam-ibigroup wants to merge 64 commits intodevfrom
build-with-vite
Open

Build with Vite#1045
binh-dam-ibigroup wants to merge 64 commits intodevfrom
build-with-vite

Conversation

@binh-dam-ibigroup
Copy link
Contributor

@binh-dam-ibigroup binh-dam-ibigroup commented Oct 17, 2025

Checklist

  • Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
  • Any modified or new methods or classes have helpful JSDoc and code is thoroughly commented
  • The description lists all applicable issues this PR seeks to resolve
  • The description lists any configuration setting(s) that differ from the default settings
  • All tests and CI builds passing

Description

This PR replaces mastarm with Vite as the build system (for dev and production). Other parts involving mastarm remain unchanged.

⚠️ Changes to your own build/deployment scripts are probably required if you previously used mastarm build or mastarm deploy ⚠️.

Useful commands:

  • Dev mode: env YAML_CONFIG=<path-to-frontend>/env.yml yarn start
  • Production build: env YAML_CONFIG=<path-to-frontend>/env.yml yarn build

if (graphHopperResponseFile) {
nock('https://graphhopper.com')
// Turn on log in order to view nock request URLs.
.log(console.log)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

nock.log no longer exists in recent node versions.

"mastarm": "^5.3.1",
"md5-file": "^4.0.0",
"nock": "^9.0.14",
"nock": "^13.5.6",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nock 14+ require adding other mocks that are currently missing. Lmk is that's worth it in this PR.

@binh-dam-ibigroup
Copy link
Contributor Author

Build passes!! 🎉🎉🎉

Copy link
Contributor

@miles-grant-ibigroup miles-grant-ibigroup left a comment

Choose a reason for hiding this comment

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

Thanks for this work! I'm very excited to see this working.

However, I'm getting a lot of this error!

when using the new yarn commands...

✘ [ERROR] The JSX syntax extension is not currently enabled

    lib/manager/components/validation/MobilityDataValidationResult.js:22:9:
      22 │   return <Table bordered className='table-fixed' fill hover stripe...
         ╵          ^

  The esbuild loader for this file is currently set to "js" but it must be set to "jsx" to be able to parse JSX syntax. You can use "loader: { '.js': 'jsx' }" to do that.

@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM public.ecr.aws/s2a5w2n9/puppeteer:latest
Copy link
Contributor

Choose a reason for hiding this comment

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

Very happy about this!

@binh-dam-ibigroup
Copy link
Contributor Author

The esbuild loader for this file is currently set to "js" but it must be set to "jsx"...

This one isn't well documented, but thankfully the fix was simple (07ead94). I also suppressed the YAML indentation warning (cfd058c)

Copy link
Contributor

@miles-grant-ibigroup miles-grant-ibigroup left a comment

Choose a reason for hiding this comment

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

Code all looks good, things work well running offline, I haven't tested deployment yet but I'm excited to see that things work with the latest version of node

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.

3 participants