ice icon indicating copy to clipboard operation
ice copied to clipboard

怎么支持 module-federation2 的能力?

Open imsenw opened this issue 6 months ago • 1 comments

import { ModuleFederationPlugin } from '@module-federation/enhanced/webpack';

export default defineConfig(() => ({
  webpack: (config) => {
      config.plugins?.push(
        new ModuleFederationPlugin({
          name: 'copilotkit',
          exposes: {
            './CopilotInput': './src/components/CopilotInput.tsx',
          },
          shared: {
            react: { singleton: true },
            'react-dom': { singleton: true },
          },
        })
      );
      return config;
  }
}))

上面的代码配置会有报错

Build Error TypeError: Cannot read properties of undefined (reading 'run') at outputDir (file:///Users/wu/app/copilotkit/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@ice/app/esm/bundler/webpack/build.js:18:18) at new Promise ()

imsenw avatar Jun 04 '25 12:06 imsenw

我们近期通过插件支持下

ClarkXia avatar Jun 04 '25 13:06 ClarkXia