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

refactor: compile and bundle monorepo using preconstruct cli #1871

Merged
merged 4 commits into from
Nov 26, 2020

Conversation

emmenko
Copy link
Member

@emmenko emmenko commented Nov 15, 2020

Use @preconstruct/cli to manage compiling and bundling monorepos, which means:

  • no more rollup (precostruct does that)
  • no more ts config files in each package

Note that we still need to bundle app-shell on our own because we still use css modules (#1884 )

@changeset-bot
Copy link

changeset-bot bot commented Nov 15, 2020

🦋 Changeset detected

Latest commit: 67ddadb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 26 packages
Name Type
@commercetools-backend/express Patch
@commercetools-backend/loggers Patch
@commercetools-frontend/actions-global Patch
@commercetools-frontend/application-components Patch
@commercetools-frontend/application-config Patch
@commercetools-frontend/application-shell Patch
@commercetools-frontend/application-shell-connectors Patch
@commercetools-frontend/babel-preset-mc-app Patch
@commercetools-frontend/browser-history Patch
@commercetools-frontend/constants Patch
@commercetools-frontend/create-mc-app Patch
@commercetools-frontend/i18n Patch
@commercetools-frontend/jest-preset-mc-app Patch
@commercetools-frontend/l10n Patch
@commercetools-frontend/mc-html-template Patch
@commercetools-frontend/mc-scripts Patch
@commercetools-frontend/notifications Patch
@commercetools-frontend/permissions Patch
@commercetools-frontend/react-notifications Patch
@commercetools-frontend/sdk Patch
@commercetools-frontend/sentry Patch
@commercetools-frontend/url-utils Patch
playground Patch
merchant-center-application-template-starter Patch
@commercetools-local/visual-testing-app Patch
@commercetools-website/components-playground Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Nov 15, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/commercetools/merchant-center-application-kit/qd5jnp5si
✅ Preview: https://merchant-center-application-kit-git-nm-tools-preconstruct.commercetools.vercel.app

@emmenko emmenko force-pushed the nm-tools-preconstruct branch from 3d9d6aa to d5f3e1a Compare November 25, 2020 19:24
@vercel vercel bot temporarily deployed to Preview November 25, 2020 19:24 Inactive
@emmenko emmenko force-pushed the nm-tools-preconstruct branch from 44802f4 to e8c370b Compare November 25, 2020 20:47
@vercel vercel bot temporarily deployed to Preview November 25, 2020 20:47 Inactive
@vercel vercel bot temporarily deployed to Preview November 25, 2020 21:28 Inactive
@emmenko emmenko marked this pull request as ready for review November 25, 2020 21:50
@vercel vercel bot temporarily deployed to Preview November 25, 2020 21:52 Inactive
@emmenko emmenko requested a review from a team November 25, 2020 21:53
Comment on lines +21 to +23
"preconstruct": {
"entrypoints": ["./index.ts", "./test-utils/index.ts"]
},
Copy link
Member Author

Choose a reason for hiding this comment

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

@adnasa FYI: this is how you would define multiple entrypoints.

Copy link
Contributor

Choose a reason for hiding this comment

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

looks nice 🤩

Comment on lines +1 to +4
{
"main": "dist/commercetools-frontend-application-shell-connectors-test-utils.cjs.js",
"module": "dist/commercetools-frontend-application-shell-connectors-test-utils.esm.js"
}
Copy link
Member Author

Choose a reason for hiding this comment

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

@adnasa ...and here.

Copy link
Contributor

@adnasa adnasa left a comment

Choose a reason for hiding this comment

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

Looks good! 🔥

Comment on lines +21 to +23
"preconstruct": {
"entrypoints": ["./index.ts", "./test-utils/index.ts"]
},
Copy link
Contributor

Choose a reason for hiding this comment

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

looks nice 🤩

"packages/sentry",
"packages/url-utils",
"packages-backend/express",
"packages-backend/loggers"
Copy link
Contributor

Choose a reason for hiding this comment

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

We could also specify packages/* and !packages/foo to have exclusion. At least that's what I did in the flopper.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes but there are several packages to exclude. For now I think being explicit is better

@emmenko emmenko merged commit 2287813 into master Nov 26, 2020
@emmenko emmenko deleted the nm-tools-preconstruct branch November 26, 2020 11:00
@ghost ghost mentioned this pull request Nov 26, 2020
@adnasa
Copy link
Contributor

adnasa commented Nov 26, 2020

👏

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.

3 participants