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

Non optimised production build? #1804

Closed
jamesh-purr opened this issue Feb 21, 2024 · 7 comments
Closed

Non optimised production build? #1804

jamesh-purr opened this issue Feb 21, 2024 · 7 comments

Comments

@jamesh-purr
Copy link

Version:

  • @inertiajs/vue3 version: ^1.0.0

Describe the problem:

Using very bare bones app.js file still triggers googles reduce unused javascript. I have tried a lot of things with vite and I still can't get this issue resolved.

Steps to reproduce:

import { createInertiaApp } from '@inertiajs/vue3';
createInertiaApp({
setup({ el, App, props }) {

},

});

first is size of app.js and second is savings it could make with removed js code.
…assets/app-06b5762a.js(example-app.test) | 56.8 KiB | 44.1 KiB

Any ideas or any possible way to get this to stop triggering google's page speed warnings?

@jameshulse
Copy link

Someone else has raised some PRs to address some of this: #1791 and #1792.

@jamesh-purr
Copy link
Author

Oh I see @jameshulse thanks for pointing out already open tasks for this issue.

@jamesh-purr
Copy link
Author

Hey @reinink

#1792
#1791

As the two pull requests above have been refused and closed this is still an issue and by google standards inertia isn't optimised.

@wilsenhc
Copy link

It would be a great addition to fix this issue, reducing bundle size is always good

@driesvints
Copy link
Contributor

Looks like we won't change anything here sorry.

@RomainLanz
Copy link

RomainLanz commented May 21, 2024

Looks like we won't change anything here sorry.

Can we know the reason at least?
It seems to be a simple, non-breaking and needed change (as shared in both linked PR)

@reinink
Copy link
Member

reinink commented May 21, 2024

@RomainLanz Hey! Only reason is for fear of breaking changes...I worry there are going to be subtle differences in the implementation of these that could break existing apps in unexpected ways.

Similar suggestions have been made in the past — for example it's been recommended that we use fetch instead of xhr so we can avoid the axios dependency, but what people don't realize is that fetch doesn't support file upload progress.

I'd like to replace the lodash dependencies eventually, but do it with some kind of beta release as you suggested in another issue 👍

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

No branches or pull requests

6 participants