ng-demo-lib icon indicating copy to clipboard operation
ng-demo-lib copied to clipboard

ng build: broken index.html references

Open Shackless opened this issue 8 years ago • 0 comments

If you build the demo using the "ng build" command, references to the generated js files in the index.html are somehow broken.

The file structure in /dist looks like this after building:

  • /root
    • /dist
      • /sandbox
        • index.html
      • vendor.js
      • styles.js
      • main.js
      • ...

In index.html, scripts are referenced like this: <script type="text/javascript" src="../inline.bundle.js"></script>

This looks fine but the browser actually tries to request "../../inline.bundle.js" (basically root/vendor.js instead of root/dist/vendor.js).

Do you have any idea how to resolve this?

Shackless avatar Jun 27 '17 14:06 Shackless