FortAwesome / ember-fontawesome

Font Awesome Ember component using SVG with JS
https://fontawesome.com
MIT License
119 stars 49 forks source link

Absolute path to package is presented in the build output assets #212

Closed stevcooo closed 2 years ago

stevcooo commented 2 years ago

Describe the bug When you install @fortawesome/ember-fontawesome": "^0.4.0" and do an ember build --prod, the output file vendor....js in dist folder contains the absolute path to another package (ember-get-config).

Reproducible test case Here I've created a repo where the issue can be reproduced easily fa-test. If you want you can directly examine the vendor file.
Or get the repo, and do npm install and examine vendor...js file in dist folder, you should see an absolute path to one of the packages in your local machine.

Expected behavior We want deterministic builds that are absolute-path invariant (i.e. the build output shouldn't depend on the machine or the location of the project in the file system). Sometimes we build on our local machine, but sometimes the build is done in some agent (CI/CD Azure for example). We want build outputs to be identical no matter the machine that they are built on. This is a regression issue, it wasn't presented earlier @fortawesome/ember-fontawesome": "^0.2.3" version that we used.

Desktop (please complete the following information):

Additional context Please check the ReadMe file for more instructions about this issue.

jrjohnson commented 2 years ago

Thanks for the report! That indeed looks like a bug. Please report this to ember-get-config as I don't think it is a problem specific ember-fontawesom. If I'm wrong about this or not understanding how we could fix it here feel free to re-open this ticket here.

stevcooo commented 2 years ago

This issue is now resolved since it was originally caused by @embroider/macros, just use @embroider/macros >=1.9.0. https://github.com/embroider-build/embroider/releases/tag/release-2022-10-06.0