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

feat: Build site using Vite #3022

Merged
merged 24 commits into from
Jan 26, 2024
Merged

feat: Build site using Vite #3022

merged 24 commits into from
Jan 26, 2024

Conversation

LautaroPetaccio
Copy link
Contributor

This PR changes the build mechanism to use Vite.
It also:

  • Updates Jest to its latest version and creates the corresponding mocking mechanisms.
  • Asynchronously loads ECS resources, reducing 2MBs out of the final build.
  • Updates al error messages using the isErrorWithMessage which was required due to the TS upgrade.
  • Removes an issue with re-exporting the modal actions from modules/modals/actions
  • Fixes some errors found while testing the app.

Copy link

vercel bot commented Jan 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
builder ❌ Failed (Inspect) Jan 25, 2024 9:49pm

@coveralls
Copy link

coveralls commented Jan 25, 2024

Pull Request Test Coverage Report for Build 7660493092

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+27.7%) to 46.088%

Totals Coverage Status
Change from base Build 7655296493: 27.7%
Covered Lines: 5217
Relevant Lines: 10222

💛 - Coveralls

Copy link
Contributor

@cyaiox cyaiox left a comment

Choose a reason for hiding this comment

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

st

index.html Outdated
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<!-- <link rel="shortcut icon" href="%VITE_BASE_URL%/favicon.ico" /> -->
Copy link
Contributor

Choose a reason for hiding this comment

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

is it still required?

@@ -31,7 +32,7 @@ function* handlefetchWorldsWalletStatsRequest(action: FetchWalletWorldsStatsRequ

yield put(fetchWorldsWalletStatsSuccess(address, stats))
} catch (e) {
yield put(fetchWorldsWalletStatsFailure(address, e.message))
yield put(fetchWorldsWalletStatsFailure(address, isErrorWithMessage(e) ? e.message : 'Unknown'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
yield put(fetchWorldsWalletStatsFailure(address, isErrorWithMessage(e) ? e.message : 'Unknown'))
yield put(fetchWorldsWalletStatsFailure(address, isErrorWithMessage(e) ? e.message : 'Unknown error'))

import * as ECS from 'decentraland-ecs'
import { SceneWriter, LightweightWriter } from 'dcl-scene-writer'
import packageJson from 'decentraland/samples/ecs/package.json'
import { isErrorWithMessage } from 'decentraland-dapps/dist/lib/error'
import sceneJsonSample from 'decentraland/samples/ecs/scene.json'
Copy link
Contributor

@cyaiox cyaiox Jan 25, 2024

Choose a reason for hiding this comment

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

is it possible to lazy load this one too?

import sceneJsonSample from 'decentraland/samples/ecs/scene.json'

@@ -40,15 +40,10 @@ import { rootSaga } from './sagas'
import { RootState, RootStore } from './types'

// eslint-disable-next-line @typescript-eslint/no-var-requires
const builderVersion = require('../../../package.json').version
// const builderVersion = require('../../../package.json').version
Copy link
Contributor

Choose a reason for hiding this comment

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

still required? 🤔

src/lib/date.ts Outdated
@@ -39,6 +39,7 @@ export function formatTime(seconds: number) {
}

function includeLocale(options: Options): Options {
console.log('Current locale', getCurrentLocale)
Copy link
Contributor

Choose a reason for hiding this comment

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

wildconsole.log appeared!

Copy link
Contributor

@cyaiox cyaiox left a comment

Choose a reason for hiding this comment

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

🚀 🚀 🚀

@LautaroPetaccio LautaroPetaccio merged commit c9b0c6a into master Jan 26, 2024
7 of 8 checks passed
@LautaroPetaccio LautaroPetaccio deleted the feat/bundle-using-vite branch January 26, 2024 14:02
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.

None yet

3 participants