Skip to content

Commit

Permalink
Merge pull request #237 from Aar-if/main
Browse files Browse the repository at this point in the history
Issue #PS-2103: Add Workspace UI implementation in admin portal
  • Loading branch information
itsvick authored Oct 8, 2024
2 parents 6f98347 + f85d5c1 commit 5a8a3f0
Show file tree
Hide file tree
Showing 17 changed files with 1,856 additions and 67 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

Expand Down
46 changes: 46 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
// next.config.mjs
/** @type {import('next').NextConfig} */
import nextI18nextConfig from "./next-i18next.config.js";
import { NextFederationPlugin } from '@module-federation/nextjs-mf';
// const url = process.env.REMOTE_EDITOR_URL
const url = 'http://localhost:3000'


const remotes = (isServer) => {
const location = isServer ? 'ssr' : 'chunks';
return {
editor: `editor@${url}/_next/static/${location}/remoteEntry.js`,
};
};

const nextConfig = {
eslint: {
Expand All @@ -10,6 +21,41 @@ const nextConfig = {
trailingSlash: false,
reactStrictMode: true,
i18n: nextI18nextConfig.i18n,

distDir: 'build',
images: {
unoptimized: true,
},
reactStrictMode: true,
experimental: {
esmExternals: false,
},
async rewrites() {
return [
{
source: '/action/:path*',
destination: '/api/proxy?path=/action/:path*',
},
{
source: '/api/:path*',
destination: '/api/proxy?path=/api/:path*',
}
];
},
webpack: (config, { isServer }) => {
config.plugins.push(
new NextFederationPlugin({
name: 'admin',
filename: 'static/chunks/remoteEntry.js',
remotes: remotes(isServer),
exposes: {

},

})
);
return config;
},
};

export default nextConfig;
Loading

0 comments on commit 5a8a3f0

Please sign in to comment.