28 lines
523 B
JavaScript
28 lines
523 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
webpack: (config) => {
|
|
// Handle WASM files
|
|
config.experiments = {
|
|
...config.experiments,
|
|
asyncWebAssembly: true,
|
|
};
|
|
|
|
// Add rule for .wasm files
|
|
config.module.rules.push({
|
|
test: /\.wasm$/,
|
|
type: 'asset/resource',
|
|
});
|
|
|
|
// Allow importing from parent directories (for rust workspace)
|
|
config.resolve.fallback = {
|
|
...config.resolve.fallback,
|
|
fs: false,
|
|
path: false,
|
|
};
|
|
|
|
return config;
|
|
},
|
|
};
|
|
|
|
module.exports = nextConfig;
|