No announcement yet.

[FIXED] [#3704] CSS resource in config prevents core JS files from being created

  • Filter
  • Time
  • Show
Clear All
new posts

    [FIXED] [#3704] CSS resource in config prevents core JS files from being created

    I am trying to have a CSS file included in the resulting HTML. My configuration is:
      "resources": [{
        "name": "style.css",
        "extract": true,
        "files": ["style.css"]
    And the resulting index.html has only these includes:
    <link rel="stylesheet" href="style.css">
    While normally it had this:
    <script src="bridge.js"></script>
    <script src="bridge.meta.js"></script>
    <script src="Core.js"></script>
    <script src="Core.meta.js"></script>
    Clearly something is incorrect but I am not sure how to make it so that the default JS files are still linked but the CSS file is also there.
    Last edited by fabricio.murta; 2018-09-04 @ 07:32 PM.

    Hello Maurycy, and welcome to Bridge.NET forums!

    I've just tried your described scenario and, yes, I get the issue you mentioned with index.html not including the javascript includes for the other resources not specified in the bridge.json's resources block; but I'm getting the assembly and Bridge javascript output every build; even if I clean up and rebuild.

    There may be something else you are setting up in your project that is preventing the actual output of the core files, as well as the assembly one. Are you sure the build is finishing? By chance, couldn't it be running to the point it dumps the CSS then fail before doing the rest?

    EDIT: I see you didn't actually mean the files were not output at all.

    But if you do specify the resources, you override the default. The code related to this is around Bridge Translator's Resource Handling file.
    Last edited by fabricio.murta; 2018-09-04 @ 01:36 AM.


      Hello again,

      It really looks that this is at least inconsistent, as it does generate all files anyway, they should be included in the index.html sample file. But that's not really a huge break, as the index.html file is usually not expected to be used in all projects -- as it is just a simple placeholder and sample for the include lines. But nevertheless, that's at minimum, an inconsistent behavior. We've created issue #3704 to track this defect. You may want to specify all resources if you really want that index.html file includes them all the time, as a workaround to the issue.

      Well, you can also just build with the Resources block commented out and copy over whatever it included in your actual project files. We'll post a follow-up here as soon as we fix this issue.


        Fixed! Bridge 17.4.0 will no longer suppress other resources when one or more are explicitly set in bridge.json.