feat: full studio build -- light theme, canvas thumbnails, i18n (fa/en)
This commit is contained in:
+48
-3
@@ -1,4 +1,49 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {};
|
||||
import createNextIntlPlugin from "next-intl/plugin";
|
||||
|
||||
export default nextConfig;
|
||||
const withNextIntl = createNextIntlPlugin("./src/i18n/request.ts");
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
output: "standalone",
|
||||
webpack: (config, { isServer, webpack }) => {
|
||||
if (!isServer) {
|
||||
config.output.globalObject = "self";
|
||||
}
|
||||
|
||||
// react-konva / konva must not load the Node `canvas` package in the browser bundle
|
||||
config.resolve.alias = {
|
||||
...config.resolve.alias,
|
||||
canvas: false,
|
||||
};
|
||||
|
||||
config.plugins.push(
|
||||
new webpack.IgnorePlugin({
|
||||
resourceRegExp: /^canvas$/,
|
||||
})
|
||||
);
|
||||
|
||||
return config;
|
||||
},
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
protocol: "https",
|
||||
hostname: "picsum.photos",
|
||||
},
|
||||
],
|
||||
},
|
||||
// Required for ffmpeg.wasm (SharedArrayBuffer needs COOP + COEP headers)
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
source: "/(.*)",
|
||||
headers: [
|
||||
{ key: "Cross-Origin-Opener-Policy", value: "same-origin" },
|
||||
{ key: "Cross-Origin-Embedder-Policy", value: "require-corp" },
|
||||
],
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
export default withNextIntl(nextConfig);
|
||||
|
||||
Reference in New Issue
Block a user