AssetMapperTypeScriptBundle
AssetMapperTypeScriptBundle copied to clipboard
SWC cannot build "chart.js"
The upstream bug is: https://github.com/swc-project/swc/issues/9559
$ '/Volumes/Dev/ResearchProject/lets-php/app-sf/var/swc-darwin-arm64' 'compile' 'assets' '--out-dir' '/Volumes/Dev/ResearchProject/lets-php/app-sf/var/typescript' '--config-file' '.swcrc'
Error: Failed to open file assets/vendor/chart.js
Caused by:
Is a directory (os error 21)
- [x] Wait for SWC fixes this issue (https://github.com/swc-project/swc/commit/85cc2bd79c3193cb0a8b54e4fce0efc1aa15b271)
- [ ] Upgrade SWC to the fixed version (https://github.com/sensiolabs/AssetMapperTypeScriptBundle/blob/main/src/Tools/TypeScriptBinaryFactory.php)
Found a simple workaround – just move the files to build to a separate folder:
sensiolabs_typescript:
source_dir:
- "%kernel.project_dir%/assets/app"
- "%kernel.project_dir%/assets/controllers"
swc_version: v1.7.26
Hi are there any news to this ticket? It looks like SWC already solved this bug and approved your commit.
Hi are there any news to this ticket? It looks like SWC already solved this bug and approved your commit.
You can manually upgrade to SWC v1.9. To ensure backward compatibility, we prefer not to update the built-in version in TypeScriptBundle. Sorry!