beam icon indicating copy to clipboard operation
beam copied to clipboard

mobile_v15 Build error

Open agritheory opened this issue 11 months ago • 2 comments

Custom BEAM routes found in /home/tyler/pinyon/apps/beam/beam/hooks.py
✓ 88 modules transformed.
beam/www/beam/registerSW.js             0.13 kB
beam/www/beam/manifest.webmanifest      0.35 kB
beam/www/beam/index.css                65.84 kB │ gzip:    20.42 kB
beam/www/beam/index.js              5,690.73 kB │ gzip: 1,225.42 kB │ map: 3,315.08 kB
✓ built in 3.29s
error during build:
Error:
  Configure "workbox.maximumFileSizeToCacheInBytes" to change the limit: the default value is 2 MiB.
  Check https://vite-pwa-org.netlify.app/guide/faq.html#missing-assets-from-sw-precache-manifest for more information.
  Assets exceeding the limit:
  - index.js is 5.69 MB, and won't be precached.

    at logWorkboxResult (file:///home/tyler/pinyon/apps/beam/node_modules/vite-plugin-pwa/dist/chunk-G4TAN34B.js:44:13)
    at generateServiceWorker (file:///home/tyler/pinyon/apps/beam/node_modules/vite-plugin-pwa/dist/index.js:229:3)
    at async _generateSW (file:///home/tyler/pinyon/apps/beam/node_modules/vite-plugin-pwa/dist/index.js:362:5)
    at async Object.handler (file:///home/tyler/pinyon/apps/beam/node_modules/vite-plugin-pwa/dist/index.js:526:13)
    at async PluginDriver.hookParallel (file:///home/tyler/pinyon/apps/beam/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:21757:17)
    at async Object.close (file:///home/tyler/pinyon/apps/beam/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:22741:13)
    at async build (file:///home/tyler/pinyon/apps/beam/node_modules/vite/dist/node/chunks/dep-CHZK6zbr.js:65624:17)
    at async CAC.<anonymous> (file:///home/tyler/pinyon/apps/beam/node_modules/vite/dist/node/cli.js:829:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

agritheory avatar Apr 02 '25 13:04 agritheory

@agritheory That's weird. Even un-minified, the maximum file size I'm seeing is ~1.3mb:

Running build command for beam
warning ../../../package.json: No license field
$ vite build --config=./beam/www/beam/vite.config.ts
Custom BEAM components found in /apps/beam/beam/hooks.py
vite v5.4.14 building for production...
Custom BEAM routes found in /apps/beam/beam/hooks.py
Custom BEAM routes found in /apps/fps/fps/hooks.py
✓ 96 modules transformed.
beam/www/beam/registerSW.js             0.13 kB
beam/www/beam/manifest.webmanifest      0.35 kB
beam/www/beam/index.DtbZI3ji.css       41.61 kB │ gzip:  12.37 kB
beam/www/beam/index.Da5frwj0.js     1,302.23 kB │ gzip: 288.44 kB │ map: 3,345.91 kB
✓ built in 1.49s

PWA v0.21.1
mode      generateSW
precache  8 entries (2626.17 KiB)
files generated
  beam/www/beam/sw.js.map
  beam/www/beam/sw.js
  beam/www/beam/workbox-5ffe50d4.js.map
  beam/www/beam/workbox-5ffe50d4.js
Done in 2.97s.
Compiling translations for beam

After minifying the build and updating the Vite-PWA package in #267, I was able to bring it down to ~600kb:

Running build command for beam
warning ../../../package.json: No license field
$ vite build --config=./beam/www/beam/vite.config.ts
Custom BEAM components found in /apps/beam/beam/hooks.py
vite v5.4.16 building for production...
Custom BEAM routes found in /apps/beam/beam/hooks.py
Custom BEAM routes found in /apps/fps/fps/hooks.py
✓ 96 modules transformed.
beam/www/beam/registerSW.js           0.13 kB
beam/www/beam/manifest.webmanifest    0.35 kB
beam/www/beam/assets/style.css       40.46 kB │ gzip:  12.07 kB
beam/www/beam/index.js              676.90 kB │ gzip: 213.05 kB │ map: 2,805.35 kB
✓ built in 1.56s

PWA v1.0.0
mode      generateSW
precache  6 entries (703.62 KiB)
files generated
  beam/www/beam/sw.js.map
  beam/www/beam/sw.js
  beam/www/beam/workbox-5ffe50d4.js.map
  beam/www/beam/workbox-5ffe50d4.js
Done in 3.00s.
Compiling translations for beam

Can you pull the latest changes there and try again?

Alchez avatar Apr 03 '25 06:04 Alchez

@agritheory could you test it? Are you still having problems with the builder?

lauty95 avatar May 23 '25 14:05 lauty95