diff --git a/src/plugin.js b/src/plugin.js index 10acd9b..92f6e1e 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -129,10 +129,17 @@ function withI18nTagPlugin(nextConfig = {}, composePlugins = {}) { if (phase === PHASE_EXPORT) { Object.assign(newConfig, { exportTrailingSlash: true, - exportPathMap: defaultPathMap => ({ - ...defaultPathMap, - ...localizedPathMaps(), - }), + exportPathMap: defaultPathMap => { + Object.keys(defaultPathMap).forEach(key => { + if (key.indexOf('/[lang]') > -1) { + delete defaultPathMap[key] + } + }) + return { + ...defaultPathMap, + ...localizedPathMaps(), + } + }, }) }