Reputation:
My problem is
(That Header.js is located same 'pages' directory level.v )
import "../../public/assets/scss/_reset.scss";
// next.config.js setting
const withSass = require('@zeit/next-sass');
module.exports = withSass();
so i also tried
import "/assets/scss/_reset.scss";
But same issue is published..
Can i know why..?
Thank you for your Read :)
Upvotes: 2
Views: 6620
Reputation:
I solves this problem! changing next.config.js!
const withSass = require('@zeit/next-sass');
const withCSS = require("@zeit/next-css");
module.exports = withCSS(withSass({
webpack(config, options) {
config.module.rules.push({
test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,
use: {
loader: 'url-loader',
options: {
limit: 100000
}
}
});
return config;
}
}));
Upvotes: 7
Reputation: 46
Did you create the file with a BOM (byte order mark) Check the file encoding and inspect the file with a plain text editor to remove the BOM. If the file needs to be in that encoding (probably utf-8) You might try to use webpack-utf8-bom from npm
Upvotes: 0