Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev-tools] Support building esm module with multiple entry points #430

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

Pessimistress
Copy link
Collaborator

No description provided.

@Pessimistress Pessimistress merged commit 418ca72 into master Sep 11, 2023
2 checks passed
@Pessimistress Pessimistress deleted the x/esm-multiple-entries branch September 11, 2023 23:18
Copy link
Collaborator

@ibgreen ibgreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, would be good to update docs and whats-new.

# build cjs bundles
CJS_ENTRIES=`node $DEV_TOOLS_DIR/src/helpers/get-cjs-entry-points.js | sed -E "s/,/ /g"`

for P in ${CJS_ENTRIES}; do (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: What is P?


esbuild $ENTRY --bundle --packages=external --format=cjs --target=es2015 --outfile=dist/index.cjs
echo "Bundling ${ENTRY}"
esbuild $ENTRY --bundle --packages=external --format=cjs --target=es2015 --outfile=dist/${P}.cjs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we are building one bundle per entry? This means that if someone is using multiple entry points they will bundle multiple bundles with copies of the same code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants