1

当前行为

我添加了一个带有--buildable标志的库,然后与文件中使用sharedMappings的两个应用程序共享它webpack.config.js。然后我添加了一个在上述应用程序中使用的服务。

应用程序dashboard在创建的服务中设置一个变量,然后单击Login按钮后,login应用程序记录变量的值。

服务应用程序工作正常。不幸的是,使用以下命令构建应用程序失败(请参阅失败日志): nx run-many --target=build --all

预期行为

它构建得很好。奇怪的是,在没有--buildable标志的情况下这样做,它确实工作正常。

重现步骤

我分叉了以下回购:https ://github.com/Coly010/ng-mfe-example并做了当前行为中描述的事情:https ://github.com/TomONeill/ng-mfe-example/commit/ f62aeb9702ee7fa97dd85948991253a8ba1c713c

失败日志

./libs/awesomelib/libname/src/index.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: C:\Workspace\nx\ng-mfe-example\libs\awesomelib\libname\src\index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
    at C:\Workspace\nx\ng-mfe-example\node_modules\@ngtools\webpack\src\ivy\loader.js:59:26

编辑:nx 团队将解决此问题: https ://github.com/nrwl/nx/issues/6923#issuecomment-933608882

4

0 回答 0