Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS bundling issue with script tags inside the markup of components #8

Open
shahriarhusainy opened this issue May 5, 2017 · 0 comments

Comments

@shahriarhusainy
Copy link

shahriarhusainy commented May 5, 2017

If within the browser.json of a user control / component (inside components folder) a CSS from URL is defined and <script> tags are present inside the markup file, all CSS files except those from the URL's will be bundled.

Here's a scenario:

A user control foocontrol is created. components > foocontrol contains the following files:

browser.json
component.js
index.marko
style.css
bar.js

The file browser.json contains:

{
  "dependencies": [{
      "type": "css",
      "url": "//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"
    },
    {
      "type": "js",
      "url": "//code.jquery.com/jquery-1.12.4.js"
    },
    {
      "type": "js",
      "url": "//code.jquery.com/ui/1.12.1/jquery-ui.js"
    },
    "./style.css",
    "./bar.js"
  ]
}

If the markup file index.marko contains <script> tags, for example:

<button  type="button" onclick="haveABlast()">
   Click Me!
</button>
<!-- More contents or nothing.. -->
<script>
  //anything that makes sense in js
</script>

This will cause style.css to get bundled but the CSS from jquery-ui.css will not be included.

@shahriarhusainy shahriarhusainy changed the title CSS bundling issue with script tags inide the markup of components CSS bundling issue with script tags inside the markup of components May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant