next.js/test/development/basic/asset-prefix/fixture/next.config.js
next.config.js31 lines635 B
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,
        },
      ],
      afterFiles: [
        {
          source: `/${ASSET_PREFIX}/:path*`,
          destination: '/:path*',
        },
        {
          source: '/not-custom-asset-prefix/:path*',
          destination: '/:path*',
        },
      ],
    }
  },
}
Quest for Codev2.0.0
/
SIGN IN