ionic-framework: 4.0.0-rc.1 missing ion-icons (with updated webpack config)

Bug Report

Ionic version:

[x] 4.x

Current behavior:

Icons are missing with the following new configuration:

{
  "glob": "**/*.svg",
  "input": "node_modules/ionicons/dist/ionicons/svg",
  "output": "./svg"
}

Expected behavior: Icons are working

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

If you cleared your cache and its still not working, see if you have your dev tools open. If so, click the ‘disable cache’ in there on the network tab and try again. This was the trick for me.

Let us summarize:

  1. Edit the angular.json like mentioned in the CHANGELOG.md
{
  "projects": {
    "app": {
      "architect": {
        "build": {
          "options": {
            "assets": [
              {
                "glob": "**/*",
                "input": "src/assets",
                "output": "assets"
              },
+             {
+               "glob": "**/*.svg",
+               "input": "node_modules/ionicons/dist/ionicons/svg",
+               "output": "./svg"
+             }
  1. (Optional) Delete www folder
  2. ng serve / ionic serve
  3. Clear browser cache

I cleared cache on Google Chrome and everything worked as expected!

node_modules/ionicons/dist/ionicons/svg exist, but www/svg not emitted.

remove node_modules and run npm install again did’nt solve the problem 😕