mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Closes: https://github.com/vercel/next.js/issues/63623 When a relative assetPrefix was set (e.g. `/custom-asset-prefix`), bundle fetching would always return a 404 as the assetPrefix was not removed from filesystem path --------- Co-authored-by: JJ Kasper <[email protected]>
21 lines
397 B
JavaScript
21 lines
397 B
JavaScript
const ASSET_PREFIX = 'custom-asset-prefix'
|
|
|
|
module.exports = {
|
|
assetPrefix: ASSET_PREFIX,
|
|
i18n: {
|
|
locales: ['en-US'],
|
|
defaultLocale: 'en-US',
|
|
},
|
|
async rewrites() {
|
|
return {
|
|
beforeFiles: [
|
|
{
|
|
source: `/:locale/${ASSET_PREFIX}/_next/:path*`,
|
|
destination: `/${ASSET_PREFIX}/_next/:path*`,
|
|
locale: false,
|
|
},
|
|
],
|
|
}
|
|
},
|
|
}
|