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

Bug on CSS #14

Closed
jefri55 opened this issue Aug 23, 2019 · 4 comments
Closed

Bug on CSS #14

jefri55 opened this issue Aug 23, 2019 · 4 comments

Comments

@jefri55
Copy link

jefri55 commented Aug 23, 2019

`./node_modules/@ashvin27/react-datatable/lib/style.css 1:12
Module parse failed: Unexpected token (1:12)
You may need an appropriate loader to handle this file type.

th.sortable {
| color: #2196F3;
| cursor: pointer;`

@ashvin27
Copy link
Owner

ashvin27 commented Aug 31, 2019

Please use "style-loader" and "css-loader" in your webpack config file.

@enero-o
Copy link

enero-o commented Jan 24, 2020

I have been tackling this same issue for a while now.
I have style-loader and css-loaders in my Webpack config, it works well on the server but crashes on the server (I have SSR setup),

The problem being that Node can't parse css, and it looks like the css-loaders and style-loaders are not kicking in on the server side.

Is there any way I could work around it , I have tried removing your require('./style.css');, but that isn't a scalable solution

@enero-o
Copy link

enero-o commented Jan 27, 2020

I finally found a solution to my issue, apparently I needed to ensure that I provided Webpack with the vendor code on the server by specifying it under nodeExternals

@ashvin27
Copy link
Owner

I'm closing this issue. Reopen it again if still anyone is facing the issue.

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

No branches or pull requests

3 participants