not able to have styles on the component
See original GitHub issueI am unable to make the packaged work, and I am looking for your help please.
this is how its look when using the demo code
and when using the native. can you please help me understand what am I doing wrong?
this is my webpack configuration:
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ['babel-loader']
}, {
test: /\.css$/,
include: [ path.resolve(__dirname, "public") ],
use: ExtractTextPlugin.extract({
use: [
{
loader: "css-loader",
options: {
modules: false,
importLoaders: true
}
}
]
})
}, {
test: /\.css$/,
exclude: /public/,
use: ExtractTextPlugin.extract({
use: [
{
loader: "css-loader",
options: {
modules: true,
importLoaders: true,
localIdentName: "[name]__[local]___[hash:base64:5]"
}
}
]
})
}
]
},
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Unable to apply styles to styled-component element in ...
You just forgot to pass the className props, see here: const Component = ({ className }) => ( <div className={className}>Hello World!
Read more >Solving the React Error: Not Picking Up CSS Style
In this guide, you will learn about the errors that can occur while importing a CSS file into your React file.
Read more >styled-components does not inject styles in head #2254
I have similar issue. Style tag in the header does not have any content, however components have their styles. DevTools shows that classes...
Read more >Not able to enable style tab for custom component
Hi Team, I am not able to enable style tab for custom component. Can you please help me with some screen shots and...
Read more >How To Use React Styled Components Efficiently
Learn how to set up organized React styled components in your project through examples, comprehensive explanations, and tips and tricks!
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No. Find a Webpack mentor or learn Webpack yourself.
That fixed it, can u please help me understand the problem? I really appreciate the help
my webpack: