Skip to content

Commit

Permalink
partially fixing module federation
Browse files Browse the repository at this point in the history
  • Loading branch information
setsun committed Jun 30, 2023
1 parent 9f73f85 commit ac89b9c
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 56 deletions.
5 changes: 0 additions & 5 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ module.exports = {
remotes: {
visualizers: 'visualizers@http://localhost:3001/_next/static/chunks/remoteEntry.js',
},
shared: [
'@react-three/fiber',
'@react-three/drei',
'three',
]
}),
);
}
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"author": "",
"license": "MIT",
"dependencies": {
"@module-federation/nextjs-mf": "^6.6.3",
"@prisma/client": "^4.16.1",
"@module-federation/nextjs-mf": "^6.7.0",
"@prisma/client": "^4.16.2",
"@radix-ui/colors": "^1.0.0",
"@radix-ui/react-icons": "^1.3.0",
"@react-spring/web": "^9.7.3",
"@react-three/drei": "^9.77.7",
"@react-three/drei": "^9.77.8",
"@react-three/fiber": "^8.13.4",
"@tailwindcss/container-queries": "^0.1.1",
"@vercel/analytics": "^1.0.1",
Expand All @@ -34,6 +34,7 @@
"styled-components": "^6.0.1",
"swr": "^2.2.0",
"three": "^0.154.0",
"tunnel-rat": "^0.1.2",
"ws": "^8.13.0",
"y-indexeddb": "^9.0.11",
"y-webrtc": "^10.2.5",
Expand All @@ -50,7 +51,7 @@
"eslint": "8.43.0",
"eslint-config-next": "13.4.7",
"postcss": "^8.4.24",
"prisma": "^4.16.1",
"prisma": "^4.16.2",
"tailwindcss": "^3.3.2",
"typescript": "5.1.6"
}
Expand Down
20 changes: 4 additions & 16 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
import { useTrail, animated, config } from '@react-spring/web';
import { useTrail, animated } from '@react-spring/web';
import { Canvas } from "@react-three/fiber";
import React from "react"
import { GetStaticProps } from "next"
import { Canvas } from "@react-three/fiber";
import WireframePlanet from "../components/hero-scenes/WireframePlanet";

// const Visual = dynamic(
// () => {
// // @ts-ignore
// const mod = import('visualizers/VisualizerOne');
// return mod;
// },
// { ssr: false },
// );

const ANIMATED_TEXT = [
"I'll miss the sea, but a person needs new experiences.",
"They jar something deep inside, allowing him to grow",
"Without change something sleeps inside us, and seldom awakens.",
"The sleeper must awaken."
"I am Setsun",
];

export const getStaticProps: GetStaticProps = async () => {
Expand Down Expand Up @@ -56,7 +44,7 @@ const Index: React.FC<Props> = (props) => {
<WireframePlanet />
</Canvas>
</div>
)
);
}

export default Index;
10 changes: 9 additions & 1 deletion pages/visualizers/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import dynamic from 'next/dynamic';

interface Props { }

const VisualizerOne = dynamic(
// @ts-ignore
() => import('visualizers/VisualizerOne'),
{ ssr: false },
);

const Visualizers: React.FC<Props> = (props) => {
return (
<div className="h-screen text-3xl flex justify-center items-center">
🚧 🚧 🚧
<VisualizerOne />
</div>
);
}
Expand Down
72 changes: 42 additions & 30 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/audio/Bring_Back.mp3
Binary file not shown.

1 comment on commit ac89b9c

@vercel
Copy link

@vercel vercel bot commented on ac89b9c Jun 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

setsun-xyz – ./

www.setsun.xyz
setsun-xyz-git-main-setsun.vercel.app
setsun-xyz-setsun.vercel.app
setsun.xyz

Please sign in to comment.