6

I have a situation where I am using polymer starter-kit template for my app. My polymer.json files looks like this:

    {
      "entrypoint": "index.html",
      "shell": "src/my-app.html",
      "fragments": [

      ],
      "sourceGlobs": [
       "src/**/*",
       "images/**/*",
       "bower.json"
      ],
      "includeDependencies": [
        "manifest.json",
        "bower_components/webcomponentsjs/webcomponents-lite.min.js"
      ]
    }

When I build using polymer-cli command - 'polymer build', the bundled folder seems to miss the shell file 'my-app.html'.

If I remove

"shell": "src/my-app.html",

from the polymer.json file, the my-app.html file gets created in the bundled/src folder as it should but then the index.html file goes missing.

I am using the polymer-starter-kit template and adding files to it. I can't figure out why my-app.html or index.html goes missing depending on how polymer.json is configured.

Can you please tell me what's going wrong here?

Thank you.

sandav
  • 323
  • 1
  • 4
  • 11
  • I am having the same problem. – Marc M. Nov 18 '16 at 07:45
  • Did you try adding `"src/my-app.html"` to the `fragments` section? I usually put all my custom elements there, just in case. – alesc Dec 03 '16 at 18:35
  • I just started from scratch again using the PSK. I made sure the 'polymer build' was working with PSK which it does as expected and then made changes incrementally. – sandav Dec 09 '16 at 19:08

1 Answers1

4

I had the same problem with you yesterday and I added "/" at front of urls in polymer.json.

{
  "entrypoint": "index.html",
  "shell": "/src/my-app.html",
  "fragments": [
    "/src/my-app.html",
    "/src/my-home.html",
    "/src/my-shop.html"
  ],
  "sourceGlobs": [
   "src/**",
   "src/**/*",
   "src/structure/**/*",
   "images/**/*",
   "bower.json"
  ],
  "includeDependencies": [
    "manifest.json",
    "bower_components/webcomponentsjs/webcomponents-lite.min.js"
  ]
}

I only added "/" at shell & fragments part and it worked.

I hope this can help.

Cheers.

pratiwis
  • 41
  • 3