-
Notifications
You must be signed in to change notification settings - Fork 8
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
Loaders are unavailable within JSS #2
Comments
I don't think we are also able to import vendor stylesheets like bootstrap from within a JSS right? That seems like a deal breaker. |
@markdalgleish not sure what you mean .... maybe an example can help .... |
Correct me if I'm wrong but I think what @markdalgleish is referring to is currently the loader lacks the ability to pass compose statements back into Webpacks loader pipeline. As an example: colour.jss.js module.exports = {
'.blue': {
color: 'blue'
},
'.green': {
color: 'green'
}
}; component.jss.js module.exports = {
'.hello': {
composes: 'blue from "./colour.jss.js"'
},
'.world': {
composes: 'green from "./colour.jss.js"'
}
}; component.js var styles = require('css?modules!jss!./component.jss.js');
var html = '<div class="' + styles.hello + '">Hello World!</div>'; |
Hrmm, actually the above statement isn't correct. |
The most obvious example of this problem is that compilation fails if your JSS depends on another JSS file (e.g. when using CSS Modules'
composes
).This is a critical issue that is likely to cause this project to become deprecated in favour of a Webpack plugin, along the lines of @andreypopp's Styling.
The text was updated successfully, but these errors were encountered: