-
Notifications
You must be signed in to change notification settings - Fork 319
Unexpected token . when loading css from react-flexbox-grid #145
Comments
It seems like SSR works where it puts all required css/scss files into one file in /static/styles.css However in the client, the loader doesn't seems to be configured correctly. |
I think this issue is related to the externals from server. Basically I think what happened was that the server didn't bundle them correctly when compiling, therefore the require/import statement in the library becomes a separate file or something that webpack can't understand (the syntax looks like a normal javascript btw if you notice in the error log). And by changing the rules of externals, it will start working again. |
Getting the same issue. Was expecting to use this module in combination with the |
I had this issue as well, and after days of trying different solutions without luck, I found a module called Like so:
|
Following the setup as described in read.me, I am getting:
Unexpected token .
D:\xxxx\xxx\node_modules\flexboxgrid2\flexboxgrid2.css:1
(function (exports, require, module, __filename, __dirname) { .container {
^
what am I doing wrong?
My next.config.js goes as follows:
// next.config.js const withCSS = require("@zeit/next-css"); module.exports = withCSS();
The text was updated successfully, but these errors were encountered: