Skip to content

Commit

Permalink
fix: yjs duplicate import error (makeplane#5297)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryan610 authored Aug 5, 2024
1 parent 0619f1b commit c99f2fc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/** @type {import("next").NextConfig} */
require("dotenv").config({ path: ".env" });
const path = require("path");

const { withSentryConfig } = require("@sentry/nextjs");
const withPWA = require("next-pwa")({
dest: "public",
Expand Down Expand Up @@ -34,6 +36,13 @@ const nextConfig = {
],
unoptimized: true,
},
webpack: (config, { isServer }) => {
if (!isServer) {
// Ensure that all imports of 'yjs' resolve to the same instance
config.resolve.alias["yjs"] = path.resolve(__dirname, "node_modules/yjs");
}
return config;
},
async redirects() {
return [
{
Expand Down

0 comments on commit c99f2fc

Please sign in to comment.