hi i use this library. but prerender true component is not import css
component code this.
import React from 'react';
import styles from './styles.css';
class Hello extends React.Component {
render() {
return (
<div>
<p className={styles.title}>Hello !!</p>
</div>
)
}
}
export default Hello;
css loader code is this
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
test: /\.css/,
loader: ExtractTextPlugin.extract({
loader: [
{
loader: 'css-loader',
query: {
localIdentName: '[hash:8]',
modules: true
}
}
]
})
}
why not import css?
Have you followed the instructions webpacker provides?
https://github.com/rails/webpacker/blob/master/docs/css.md
Usually the <%= stylesheet_pack_tag 'application' %> gets missed.
Most helpful comment
Have you followed the instructions webpacker provides?
https://github.com/rails/webpacker/blob/master/docs/css.md
Usually the
<%= stylesheet_pack_tag 'application' %>gets missed.