Skip to content

Fix: Preact build doesn't work due to incorrect Preact imports - #235

Merged
kentcdodds merged 1 commit into
kentcdodds:mainfrom
SaiMaheshwarReddy:fix/preact-build
Jul 8, 2023
Merged

kentcdodds merged 1 commit into
kentcdodds:mainfrom
SaiMaheshwarReddy:fix/preact-build

Conversation

@SaiMaheshwarReddy

Copy link
Copy Markdown
Contributor

What: Preact build doesn't work due to incorrect Preact imports

Why: downshift is not working with preact

How: I had to go through the build process and change import alias from "preact" to "preact/compat"

Checklist:

  • Documentation
  • Tests
  • Ready to be merged

Steps I followed to test:

  1. Made the alias change for kcd-scripts in downshift node_modules
  2. I ran the build and copied preact build output in a sample preact app
  3. It started working :)

Downshift issues related to this:

  1. Preact build doesn't work due to incorrect Preact imports downshift-js/downshift#1430
  2. Preact build imports hooks from wrong module downshift-js/downshift#1198

@kentcdodds kentcdodds left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This is a backing change, bit I believe downshift is the only active library using this feature so I have no problem merging.

@kentcdodds

Copy link
Copy Markdown
Owner

Thank you for working on this. Hopefully CI works because this project isn't very active and some things could be outdated.

@codecov

codecov Bot commented Jul 8, 2023 •

Copy link
Copy Markdown

Codecov Report

Merging #235 (b39924d) into main (4b50543) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #235      +/-   ##
==========================================
+ Coverage   63.33%   63.39%   +0.06%     
==========================================
  Files          21       21              
  Lines         600      601       +1     
  Branches      227      227              
==========================================
+ Hits          380      381       +1     
  Misses        179      179              
  Partials       41       41              
Impacted Files Coverage Δ
src/config/babelrc.js 53.33% <100.00%> (+1.06%) ⬆️

@kentcdodds
kentcdodds merged commit aea6b3c into kentcdodds:main Jul 8, 2023
@kentcdodds

Copy link
Copy Markdown
Owner

@all-contributors please add @SaiMaheshwarReddy for code

@allcontributors

Copy link
Copy Markdown
Contributor

@kentcdodds

I've put up a pull request to add @SaiMaheshwarReddy! 🎉

@github-actions

github-actions Bot commented Jul 8, 2023

Copy link
Copy Markdown

🎉 This PR is included in version 14.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants