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

Configuration options not picked up when used in an addon #159

Closed
patrickberkeley opened this issue Jun 2, 2020 · 3 comments
Closed

Configuration options not picked up when used in an addon #159

patrickberkeley opened this issue Jun 2, 2020 · 3 comments
Labels

Comments

@patrickberkeley
Copy link

🐞 Bug Report

Describe the bug

Options specified in an addon's ember-cli-build.js – that is consumed by an app – are not applied.

Reproduce the bug

  • Create an ember addon.
  • Install ember-svg-jar in the addon
  • Set some svgJar options in the addon's ember-cli-build.js
  • Create an ember app
  • Install your newly created addon in your newly created ember app
  • Render an icon in your app
  • Notice the options you specified in the addon's ember-cli-build.js are not applied

Expected behavior

Options specified in an addon's ember-cli-build.js – that is consumed by an app – are applied.

Possible Solution

No idea.

Screenshots

Example ember-cli-build.js options in an addon:

And source from an icon rendered in the app. Notice xmlns is still present, and the html IDs are still minified:

Additional context

  • ember-cli 3.17.0
  • ember-svg-jar 2.2.3
  • svgo 1.3.2
@patrickberkeley
Copy link
Author

One of the outcomes of this issue for us is we cannot use svgs with the following structure:

The reason is their IDs collide because they are all minified to the same two letters: #a for path and #b for clipPath.

@patrickberkeley
Copy link
Author

patrickberkeley commented Jun 3, 2020

This is possibly a dup of – or at min overlapping with – #106.

@patrickberkeley
Copy link
Author

This comment on #106 got things working for me: #106 (comment)

I needed to:

  1. Move ember-svg-jar from dependencies to devDependencies in my addon
  2. Install ember-svg-jar indevDependencies in my app
  3. Copy the svgJar config from my addon's ember-cli-build.js to app's ember-cli-build.js
  4. Update the sourceDirs path in the svgJar config to be an absolute path that points to my addon

It seems like there should be – or it would be nice if there were – a way to not have to install ember-svg-jar in all apps and addons and copy the config into each.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant