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

allow for separate-bundling css mode #4

Open
Bubblyworld opened this issue Feb 10, 2015 · 0 comments
Open

allow for separate-bundling css mode #4

Bubblyworld opened this issue Feb 10, 2015 · 0 comments

Comments

@Bubblyworld
Copy link
Contributor

Should support a site being compatible with users who disable their javascript. To do this we need to bundle css separately and inject it in the page template as link tags.

One, we'd need to update bundles.json as follows:

{
  "bundles": {
    "bundles/gs68g9g7d.js": ["some/component.jsx!jsx-plugin"],
    "bundles/gs68g9g7d.css!": ["some/component.css!css-plugin"]
  }
}

Two, in renderPage we'd have to check whether a given visible bundle is css or js and inject it as a link or script tag respectively.

Obviously the build function would have to change too to support this - it could just parse out any css files in the bundles output by the bundle optimizer and package them as separate bundles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant