Closed capndave closed 2 years ago
First of all, this package only fixes the path restriction of vite when using dynamic import. It is not responsible for loading modules.
Like this:
import('@alias/comp.tsx') -> import('./comp.tsx')
import('./' + 'comp.tsx') -> import('./comp.tsx')
Can I see the code of ComponentWithDynamicImports
?
Another question: did your error report occur during vite build
or vite serve
?
Error was with vite serve
. I don't have visibility into the component other than what appears in node_modules
. I think those files might be minified as well.
Unfortunately I can't show the code of ComponentWithDynamicImports, as it's a stand-in for a proprietary component at my company. I'll spend some time digging into it when I can. It's occurring during vite serve.
On Wed, Apr 6, 2022 at 7:23 PM 草鞋没号 @.***> wrote:
First of all, this package only fixes the path restriction of vite when using dynamic import. It is not responsible for loading modules. Can I see the code of ComponentWithDynamicImports? Another question: did your error report occur during vite build or vite serve?
— Reply to this email directly, view it on GitHub https://github.com/caoxiemeihao/vite-plugins/issues/16#issuecomment-1090953755, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTOOZNM4CCG5AMV7FVVCUDVDYTHTANCNFSM5SW75AHA . You are receiving this because you authored the thread.Message ID: @.***>
Will the dynamic-imports plugin allow me to import packages that use dynamic imports? If so, how do I set that up in my vite project?
Example of current problem
returns