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: use try-catch with dynamic imports so that they can be replaced easily by bundlers #262

Merged
merged 1 commit into from
Jun 2, 2024

Conversation

brc-dd
Copy link
Contributor

@brc-dd brc-dd commented Jun 2, 2024

Notable Changes

Commit Message Summary (CHANGELOG)

make it easy to replace dynamic imports for tools bundling this module

Type

  • CI
  • Fix
  • Perf
  • Docs
  • Test
  • Chore
  • Style
  • Build
  • Feature
  • Refactor

SemVer

  • Fix (:label: Patch)
  • Feature (:label: Minor)
  • Breaking Change (:label: Major)

Issues

This was adjusted in #260. Needed for vite because without replacement rollup bundles tsx and jiti. yaml import is already correct.

Checklist

  • Lint and unit tests pass with my changes
  • I have added tests that prove my fix is effective/works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes are merged and published in downstream modules

@@ -1,6 +1,6 @@
{
"compilerOptions": {
"module": "Preserve",
Copy link
Contributor Author

@brc-dd brc-dd Jun 2, 2024

Choose a reason for hiding this comment

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

not sure why was this Preserve, but Preserve is not a valid value for module

@brc-dd brc-dd changed the title fix: use try-catch with dynamic imports so that they can be replaced with require by bundlers refactor: use try-catch with dynamic imports so that they can be replaced easily by bundlers Jun 2, 2024
@ai ai merged commit 1c2e382 into postcss:main Jun 2, 2024
3 checks passed
@ai
Copy link
Member

ai commented Jun 2, 2024

Thanks. Released in 6.0.1.

@brc-dd brc-dd deleted the replaceable-dynamic-import branch June 2, 2024 19:12
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