You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nethriis: When the argument of import is a static string like './commands/ping' the chunks folder is generated on prepack and everything works well but with a variable, in my case findPath('ping') the chuncks folder is not generated
Hi. You need to pass statically analazable paths to both static and dynamic imports this way rollup can properly resolve them during build and bundle/make chunks.
It should be something like import('./path/to/ping.ts') for example.
Discussed in unjs/community#6
Originally posted by nethriis May 4, 2024
Hi, does anyone know how to dynamically import TypeScript files with
unbuild
in ESM? I have this code:However, during the prepack with
unbuild
, I don't see a 'chunks' folder, and consequently there's an import issue for this file.The text was updated successfully, but these errors were encountered: