-
Notifications
You must be signed in to change notification settings - Fork 91
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
Styled-jsx ignored #61
Comments
Hi @johanleroch But since styled-jsx is basically just a template string in your component, you should be able to concatenate it with a direct <style jsx>{`
.header {
background-image: url('${require('./my-image.jpg')}');
}
`}</style> Does it work for you like this? If not, can you please provide a snipped where you tried to include the image in styled-jsx? Thanks! |
Got the same issue with
Example above gives the right image not sure if ti's DEV mode issue tho |
Hi @lun4i style={{
backgroundImage: `url('${require('static/images/b_black.png').trace}')`,
}} (or |
@cyrilwanner follow-up question : How would you use a E.g. .no-webp .loadedBackground {
background-image: url('../static/backgrounds/bigbg.jpg?trace');
} will get transformed to |
Hello all,
I'm facing an issue regarding
<style jsx>{``}</style>
in my components.When I want to put an image inline through SCSS files or with import / require statements in JS files it's working fine.
But not with style jsx, so I'm wondering if this plugin supports parsing
<style jsx>
?Someone has something working with style jsx ?
I'm using '[email protected]' + '@zeit/[email protected]' in the project.
Thank you !
The text was updated successfully, but these errors were encountered: