Buckets:
| const enableCaching = !!process.env.ENABLE_CACHING | |
| /** | |
| * @type {import('next').NextConfig} | |
| */ | |
| const nextConfig = { | |
| turbopack: { | |
| rules: { | |
| './app/**/page.{jsx,tsx}': { | |
| loaders: ['./my-timestamp-loader.js'], | |
| }, | |
| './app/loader/page.tsx': { | |
| loaders: ['./my-loader.js'], | |
| }, | |
| './pages/pages.tsx': { | |
| loaders: ['./my-timestamp-loader.js'], | |
| }, | |
| }, | |
| }, | |
| experimental: { | |
| turbopackFileSystemCacheForBuild: enableCaching, | |
| turbopackFileSystemCacheForDev: enableCaching, | |
| }, | |
| env: { | |
| NEXT_PUBLIC_CONFIG_ENV: 'hello world', | |
| }, | |
| webpack(config, { dev }) { | |
| config.module.rules.push({ | |
| test: /app(?:\/.*)?\/page\.[tj]sx|pages\/pages\.tsx/, | |
| use: ['./my-timestamp-loader.js'], | |
| }) | |
| config.module.rules.push({ | |
| test: /app\/loader(?:\/client)?\/page\.tsx/, | |
| use: ['./my-loader.js'], | |
| }) | |
| if (enableCaching) { | |
| config.cache = Object.freeze({ | |
| type: 'memory', | |
| }) | |
| } | |
| if (dev) { | |
| // Make webpack consider the build as large change which makes it filesystem cache it sooner | |
| config.plugins.push((compiler) => { | |
| compiler.__extra_delay = true | |
| }) | |
| } | |
| return config | |
| }, | |
| } | |
| module.exports = nextConfig | |
Xet Storage Details
- Size:
- 1.25 kB
- Xet hash:
- 5920f3c7d55143c8d195b741aa0f08eb7fa076f5480326a32f5d6a9ce2daef12
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.