Files
XgridConverter/next.config.ts
Andreas Wilms 9b5f2d0814 test
2026-03-09 12:25:43 +01:00

45 lines
987 B
TypeScript

import type { NextConfig } from "next";
import CopyWebpackPlugin from "copy-webpack-plugin";
const nextConfig: NextConfig = {
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;