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

Docker build fails due to large js chunks #181

Closed
gromdimon opened this issue Nov 3, 2023 · 1 comment · Fixed by #192
Closed

Docker build fails due to large js chunks #181

gromdimon opened this issue Nov 3, 2023 · 1 comment · Fixed by #192
Assignees
Labels
bug Something isn't working
Milestone

Comments

@gromdimon
Copy link
Contributor

Describe the bug
Docker started failling building image with the following warning:

(!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 11.44s

To Reproduce
Steps to reproduce the behavior:

  1. Go to frontend/
  2. Run npm run build
  3. See warning

Expected behavior
Currently we have custon vite setting chunkSizeWarningLimit, but we should find an optimal solution.

Screenshots
N/A

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
N/A

@gromdimon gromdimon added the bug Something isn't working label Nov 3, 2023
@gromdimon gromdimon added this to the 0.2.0 milestone Nov 3, 2023
@holtgrewe
Copy link
Member

Here is how to do this in the Vue Router Docs:

// replace
// import UserDetails from './views/UserDetails'
// with
const UserDetails = () => import('./views/UserDetails.vue')

const router = createRouter({
  // ...
  routes: [
    { path: '/users/:id', component: UserDetails }
    // or use it directly in the route definition
    { path: '/users/:id', component: () => import('./views/UserDetails.vue') },
  ],
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants