Coralite v0.28.1 Released
Coralite v0.28.1 resolves a path resolution bug in the script manager where standalone component imports failed when placed in different directories.
Coralite v0.28.1 has been released. This patch release resolves a path resolution issue in the script manager's compilation of standalone components, ensuring correct relative import paths are generated when components reside in different directories.
Correct Path Resolution for Standalone Component Imports
Previously, the compileStandaloneComponent function resolved all coralite-component/* imports to local files in the same directory (i.e. ./*.js). This behavior caused runtime resolution errors when imported components were located in other nested directories.
To address this, this patch updates the esbuild onResolve hook in compileStandaloneComponent. The hook now references the registered file paths in sharedFunctions to dynamically calculate the actual relative path between the importing component and the imported component, enabling support for multi-directory component structures.
How to Upgrade
To upgrade to the latest version, update your project dependencies:
npm install coralite@0.28.1
npm install coralite-scripts@0.28.1