This commit is contained in:
Andreas Wilms
2026-03-09 12:25:43 +01:00
parent 13c06d93d8
commit 9b5f2d0814
10 changed files with 1716 additions and 66 deletions

View File

@@ -1,7 +1,44 @@
import type { NextConfig } from "next";
import CopyWebpackPlugin from "copy-webpack-plugin";
const nextConfig: NextConfig = {
/* config options here */
turbopack: {}, // silences the warning but we force webpack below
webpack: (config, { isServer, webpack }) => {
config.plugins.push(
new webpack.IgnorePlugin({
resourceRegExp: /webp\.wasm$/,
}),
);
config.resolve.alias = {
...config.resolve.alias,
"webp.wasm": false,
};
if (!isServer) {
config.plugins.push(
new CopyWebpackPlugin({
patterns: [
{
from: "node_modules/@playcanvas/splat-transform/lib/webp.wasm",
to: "../static/chunks/webp.wasm",
},
],
}),
);
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
path: false,
module: false,
url: false,
os: false,
};
}
return config;
},
};
export default nextConfig;