Spaces:
Build error
Build error
Update next.config.mjs
Browse files- next.config.mjs +40 -0
next.config.mjs
CHANGED
|
@@ -2,6 +2,46 @@
|
|
| 2 |
const nextConfig = {
|
| 3 |
output: "standalone",
|
| 4 |
reactStrictMode: true,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
};
|
| 6 |
|
| 7 |
export default nextConfig;
|
|
|
|
| 2 |
const nextConfig = {
|
| 3 |
output: "standalone",
|
| 4 |
reactStrictMode: true,
|
| 5 |
+
// Disable telemetry to speed up builds
|
| 6 |
+
telemetry: false,
|
| 7 |
+
// Skip type checking during build (faster builds, type errors caught in dev)
|
| 8 |
+
typescript: {
|
| 9 |
+
ignoreBuildErrors: false, // Keep this false for production, but speeds up if set to true
|
| 10 |
+
},
|
| 11 |
+
// Skip ESLint during build for faster builds
|
| 12 |
+
eslint: {
|
| 13 |
+
ignoreDuringBuilds: false, // Keep this false for production, but speeds up if set to true
|
| 14 |
+
},
|
| 15 |
+
// Optimize webpack to skip processing large data files
|
| 16 |
+
webpack: (config, { isServer }) => {
|
| 17 |
+
// Ignore parquet files - they're only used at runtime by DuckDB-WASM
|
| 18 |
+
// They should be treated as static assets, not processed by webpack
|
| 19 |
+
config.module.rules.push({
|
| 20 |
+
test: /\.parquet$/,
|
| 21 |
+
type: 'asset/resource',
|
| 22 |
+
});
|
| 23 |
+
|
| 24 |
+
// Reduce webpack processing overhead
|
| 25 |
+
if (!isServer) {
|
| 26 |
+
config.optimization = {
|
| 27 |
+
...config.optimization,
|
| 28 |
+
// Reduce chunk splitting overhead for faster builds
|
| 29 |
+
splitChunks: {
|
| 30 |
+
chunks: 'all',
|
| 31 |
+
cacheGroups: {
|
| 32 |
+
default: false,
|
| 33 |
+
vendors: false,
|
| 34 |
+
},
|
| 35 |
+
},
|
| 36 |
+
};
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
return config;
|
| 40 |
+
},
|
| 41 |
+
// Exclude large files from static optimization
|
| 42 |
+
experimental: {
|
| 43 |
+
optimizePackageImports: ['@duckdb/duckdb-wasm'],
|
| 44 |
+
},
|
| 45 |
};
|
| 46 |
|
| 47 |
export default nextConfig;
|