Open jdwillemse opened 5 years ago
I fixed it by updating webpack and using https://github.com/webpack-contrib/mini-css-extract-plugin.
// scss handling
config.module.rules.push({
test: /\.scss$/,
use: [
MiniCssExtractPlugin.loader,
'babel-loader',
{
loader: 'css-loader',
options: {
url: false,
minimize: !dev,
importLoaders: 2,
},
},
{
loader: 'postcss-loader',
options: {
plugins: [
autoPrefixer({
/* options */
}),
],
},
},
{
loader: 'sass-loader',
},
],
});
config.plugins.push(
new CopyWebpackPlugin(
[{
// locales copying
from: path.join(__dirname, 'assets', 'locales'),
to: path.join(__dirname, 'static', envConfig.VERSION_HASH, 'locales'),
}, ], {
copyUnmodified: true,
},
),
new MiniCssExtractPlugin({
filename: path.join(
dev ? __dirname : '.',
'static',
envConfig.VERSION_HASH,
'styles',
'main.css',
),
}),
);
Thanks so much for your fix! I have not maintained this for some time and nextjs is already in v8 now :) It’s time that I need to update this repo 😄
When running
yarn dev
after install I get the following error:From a quick google this seems to be related to outdated webpack plugins