Closed handrei closed 4 years ago
hello, i'm trying to add another config file, but i still get that error : baseConfig is not a function my i18n.config.js
const { nextI18NextRewrites } = require('next-i18next/rewrites'); const localeSubpaths = { en: 'en' }; module.exports = { rewrites: async () => nextI18NextRewrites(localeSubpaths), publicRuntimeConfig: { localeSubpaths, }, };
my next.config.js
const { withPlugins, extend } = require('next-compose-plugins'); const withImages = require('next-images'); const baseConfig = require('./i18n.config'); const nextConfig = { webpack(config, options) { const { isServer } = options; config.module.rules.push({ test: /\.(ogg|mp3|wav|mpe?g)$/i, exclude: config.exclude, use: [ { loader: require.resolve('url-loader'), options: { limit: config.inlineImageLimit, fallback: require.resolve('file-loader'), publicPath: `${config.assetPrefix}/_next/static/images/`, outputPath: `${isServer ? '../' : ''}static/images/`, name: '[name]-[hash].[ext]', esModule: config.esModule || false, }, }, ], }); return config; }, }; module.exports = extend(baseConfig).withPlugins([withImages], nextConfig);
i figure it out, sorry for the ticket.
hello, i'm trying to add another config file, but i still get that error : baseConfig is not a function my i18n.config.js
my next.config.js