Skip to content

Commit 0a89851

Browse files
committed
feat(npm-scripts): add more projects to federated build
Note that this configuration object is equivalent to the bundler's default preset https://github.com/liferay/liferay-frontend-projects/blob/3fc3764838c85494e07a248f58bd5bba02044be4/projects/npm-tools/packages/npm-bundler-preset-liferay-dev/config.json#L22 We are including it inside `npm-scripts` for now, but we will need to extract it somewhere in the future (if not for us, for customers, to configure their builds). The way to do it is yet to be defined.
1 parent 4271a77 commit 0a89851

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

projects/npm-tools/packages/npm-scripts/src/utils/createFederationConfig.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,24 @@ const writeWebpackFederationEntryPoint = require('./writeWebpackFederationEntryP
2121
* the relation is not used for anything. However, it is better to do it this
2222
* way, because if we mix all together we end up with a very entangled
2323
* configuration.
24+
*
25+
* Note also that when you want to include a project in the federated build to
26+
* consume other packages (even if it doesn't publish any package) you must
27+
* declare it here.
2428
*/
2529
const FEDERATED_PACKAGES = {
26-
'frontend-js-react-web': ['react'],
30+
'frontend-js-react-web': [
31+
'classnames',
32+
'formik',
33+
'prop-types',
34+
'react',
35+
'react-dnd',
36+
'react-dnd-html5-backend',
37+
'react-dom',
38+
],
39+
'frontend-js-web': [],
40+
'frontend-taglib-clay': ['@clayui/icon'],
41+
'portal-template-react-renderer-impl': [],
2742
};
2843

2944
/**

0 commit comments

Comments
 (0)