excalidraw/examples/with-nextjs/next.config.js
2025-03-18 21:41:00 +11:00

25 lines
545 B
JavaScript

// next.config.js
module.exports = {
webpack(config, { isServer }) {
config.distDir = "build";
config.typescript = {
ignoreBuildErrors: true,
};
config.transpileModules = ["../"];
if (!isServer) {
config.module.rules.push({
test: /\.worker\.(js|ts)$/,
use: {
loader: "worker-loader",
options: {
// You can tweak the filename pattern here
filename: "static/chunks/[hash].worker.js",
},
},
});
}
return config;
},
};