Open sks-2410 opened 4 years ago
I wonder if this (simplified) example, where the webpack config isn't getting seen (for example, error messages from the console indicate the raw-loader
and @svgr/webpack
parts aren't getting through) is similar to what @sks-2410 is experiencing:
const withPlugins = require('next-compose-plugins')
const withImages = require('next-images')
const optimizedImages = require('next-optimized-images')
const webpackConfig = {
target: 'serverless',
webpack: function (config) {
config.module.rules.push(
{
test: /\.md$/,
use: 'raw-loader',
},
{
test: /\.svg$/,
use: ['@svgr/webpack'],
}
)
return config
},
}
module.exports = withPlugins([
[withImages, {}],
[optimizedImages, {}],
], webpackConfig)
Corrections/comments appreciated.
Any thoughts on what I mentioned above? Still not clear on this.
Is something wrong with my config? None of the plugins are working.