ice
ice copied to clipboard
怎么支持 module-federation2 的能力?
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 (
我们近期通过插件支持下