test
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user