question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Usage with Vitejs

See original GitHub issue

💬 Questions and Help

Hello, we recently had to migrate a huge Webpack app over to Vitejs. And the fact is that in the Webpack version we were using loadable-components. But because of its dependency on Webpack for SSR we decided that we were gonna disable it temporarly. But now, we would like to try and hook it up with Vite so that it works without problem.

So that question is: does loadable-components work or has any plans to work with Vite? If not, the limitation right now is the SSR piece with the babel plugin as well as the chunks collector? If so, could you point us towards a possible solution? We could very much provide some PR if needed even.

Thanks!!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:5

github_iconTop GitHub Comments

2reactions
theKasheycommented, Sep 20, 2021

Hey. Unfortunately loadable-components currently are very webpack specific. There are plans to make it less bound to the underlying system, but this is not something you can expect to happen soon enough.

Currently, the only “browser-independent” code splitting solution is react-imported-component, which I do maintain as well, but it hasn’t been tested with Vite, so no guarantees as well.

1reaction
tannera-cargillcommented, Jun 22, 2022

Vite is gaining in popularity, I hope this stance can be reconsidered.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started - Vite
Legacy browsers can be supported via the official @vitejs/plugin-legacy - see ... You can navigate to vite.new/{template} to select which framework to use....
Read more >
Vite JS - Next Generation Frontend Tool
Here, Vite uses source code over native ESM. And by using ESBuild and ESM under the hood, Vite enhances the startup speed 10-100x....
Read more >
How to Install and Use Vite in Your Web Projects
Vite.js is a rapid development tool for modern web projects. It focuses on speed and performance by improving the development experience.
Read more >
What is Vitejs? An Overview of the New Front-end Build Tool
Vite is a build tool that significantly improves the front-end development experience. You can use Vite to set up a development environment ...
Read more >
How to Develop and Deploy Fast Applications With Vite JS
ESM support allows browsers to fetch modules when importing them. Vite uses ESM to eliminate the build step while in development fully. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found