Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13562

Asset tag creates a directory with same name of targeted file

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.1
    • Fix Version/s: None
    • Component/s: cordova-browser

      Description

      Asset tag appears to be broken in the browser platform. According to the docs at http://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#asset when you add an asset tag like:

      <asset src="www/foo.js" target="foo.js" />
      

      it should copy www/foo.js to platforms/browser/www/foo.js but instead it creates a subdirectory called foo.js and the full path to the file is platforms/browser/www/foo.js/foo.js.

      If you want to duplicate this issue please create a new project then:

      cordova platform add browser@5.0.1
      cordova plugin add phonegap-plugin-push
      cordova build browser

      then you will see that platforms/browser/www/ServiceWorker.js/ServiceWorker.js exists when it should be platforms/browser/www/ServiceWorker.js.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                purplecabbage Jesse MacFadyen
                Reporter:
                macdonst Simon MacDonald
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: