Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error when including stopwatch-20 icon #200

Closed
stopfstedt opened this issue Feb 10, 2022 · 0 comments · Fixed by #201
Closed

Build error when including stopwatch-20 icon #200

stopfstedt opened this issue Feb 10, 2022 · 0 comments · Fixed by #201

Comments

@stopfstedt
Copy link
Contributor

Describe the bug
Build error when attempting to include stopwatch-20 in icons.js.

module.exports = function () {
  return {
    'free-solid-svg-icons': [
      'stopwatch-20',
  };
};

Reproducible test case
check out this branch and then run ember build on it after you installed packages.
https://github.com/stopfstedt/ember-fontawesome/tree/stopwatch-20

it's fail with an error message similar to

'faStopwatch_20' is not exported by ../../../../home/stefan/dev/projects/ember-fontawesome/node_modules/@fortawesome/free-solid-svg-icons/index.es.js, imported by exports-free-solid-svg-icons.js

Expected behavior

The build is expected to pass successfully.

Desktop (please complete the following information):

ember-cli: 3.28.3
node: 16.13.0
os: linux x64

Additional context

The problem here seems to be that the generated lookup key for the icon is constructed incorrectly. the correct icon key would be faStopwatch20 rather than faStopwatch_20
i tracked this down to the camelCasing library used, see FontAwesomePack::build() for implementation details.

My current workaround is to omit the dash before the number, like so:

module.exports = function () {
  return {
    'free-solid-svg-icons': [
      'stopwatch20',
  };
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant