Skip to content

Commit

Permalink
chore: remove some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MadaraUchiha-314 committed Aug 4, 2023
1 parent bed655a commit ea359cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# rollup-plugin-module-federation

![Build](https://github.com/MadaraUchiha-314/rollup-plugin-module-federation/actions/workflows/ci.yaml/badge.svg)
![Build](https://github.com/MadaraUchiha-314/rollup-plugin-module-federation/actions/workflows/ci.yaml/badge.svg)
![Node version](https://img.shields.io/node/v/rollup-plugin-module-federation)
![NPM package version](https://img.shields.io/npm/v/rollup-plugin-module-federation)

Expand Down
15 changes: 1 addition & 14 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,18 +345,9 @@ export default function federation(federationConfig) {
setSharedScope(sharedScope);
${Object.entries(shared)
.map(([key, sharedModule]) => {
/**
* TODO: Get the default values of these from the nearest package.json
*/
const { shareKey } = sharedModule;
/**
* Handle import false.
*/
const importedModule = sharedModule.import ?? key;
const versionForSharedModule = getVersionForModule(importedModule);
/**
* TODO: Add versioning information.
*/
return importedModule
? `
register(sharedScope, '${
Expand Down Expand Up @@ -419,11 +410,7 @@ export default function federation(federationConfig) {
await asyncWalk(ast, {
async enter(node) {
/**
* TODO: Check if we are statically importing any local files that are shared or exposed.
* We need to generate a separate chunk for those files.
* We cannot let rollup parse those code and inline them. So we need to take care of those imports here itself.
* We convert those imorts into dynamic imports.
* What about eager ? Don't know. TBD.
* TODO: What about eager ? Don't know. TBD.
*/
if (
Object.keys(IMPORTS_TO_FEDERATED_IMPORTS_NODES).includes(
Expand Down

0 comments on commit ea359cb

Please sign in to comment.