my-app.html missing from bundled build folder
Asked Answered
G

1

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.

Giralda answered 14/11, 2016 at 20:29 Comment(3)
I am having the same problem.Forwarder
Did you try adding "src/my-app.html" to the fragments section? I usually put all my custom elements there, just in case.Kelikeligot
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.Giralda
E
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.

Excavator answered 22/12, 2016 at 11:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.