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

troubles adding an svg #14

Closed
jason-timios opened this issue May 10, 2017 · 3 comments
Closed

troubles adding an svg #14

jason-timios opened this issue May 10, 2017 · 3 comments
Assignees
Labels

Comments

@jason-timios
Copy link

jason-timios commented May 10, 2017

I'm submitting a ... (check one with "x")

[x] bug report => check the README and search github for a similar issue or PR before submitting
[ ] support request => check the README and search github for a similar issue or PR before submitting
[ ] feature request

Current behavior

add svg to src/client/assets
example css background: url('../../assets/bg.svg') no-repeat center center;
webpack fails to build with error:

/home/<REDACTED>/Projects/<REDACTED>/node_modules/webpack/lib/TemplatedPathPlugin.js:69
                .replace(REGEXP_CHUNKHASH, withHashLength(getReplacer(chunkHash), chunkHashWithLength))
   ^
Error: Path variable [chunkhash] not implemented in this context: assets/bg.[chunkhash].svg

Expected/desired behavior

For the svg to show as a background using relative paths to describe where it should be found.

Minimal reproduction of the problem with instructions

npm run build:spa-hmr

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Ubuntu 17.04, VsCode, NPM

  • Angular version: 2.0.X

Angular 4.10

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

  • Node (for AoT issues): node --version =

@jason-timios
Copy link
Author

Seems to be fixed by using [hash] instead of [chunkhash] in webpack.common.js

@fulls1z3 fulls1z3 changed the title Troubles adding an svg [question] troubles adding an svg May 11, 2017
@fulls1z3
Copy link
Owner

@jason-candeo thank for reporting this, I'll check this soon.

@fulls1z3 fulls1z3 changed the title [question] troubles adding an svg [bug] troubles adding an svg May 11, 2017
@fulls1z3 fulls1z3 added the bug label May 11, 2017
@fulls1z3 fulls1z3 self-assigned this May 11, 2017
fulls1z3 pushed a commit that referenced this issue Aug 2, 2017
@fulls1z3
Copy link
Owner

fulls1z3 commented Aug 2, 2017

@jason-candeo done 👍

@fulls1z3 fulls1z3 closed this as completed Aug 2, 2017
fulls1z3 pushed a commit that referenced this issue Sep 9, 2017
* chore(package): update deps

Closes #14
Closes #36
Closes #38
fulls1z3 pushed a commit that referenced this issue Sep 9, 2017
* chore(package): update deps

Closes #14
Closes #36
Closes #38
fulls1z3 pushed a commit that referenced this issue Sep 9, 2017
* chore(package): update deps

Closes #14
Closes #36
Closes #38
@fulls1z3 fulls1z3 changed the title [bug] troubles adding an svg troubles adding an svg Sep 16, 2017
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

2 participants