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

fix: add patch to fully specify resolve path in stencil output targets #502

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

borisdiakur
Copy link
Contributor

@borisdiakur borisdiakur commented Feb 3, 2023

Description

This PR includes a patch to the Stencil Vue and React output targets, resolving an issue with relatively imported modules, which need to have the .js or /index.js extension to be added to the import path in order to resolve an actual path, when working with esm in environments, where a fully specified path is the default (such as in a create react app with webpack 5, which, if not ejected and changed, has resolve.fullySpecified set to true).

Fixes #495

References:

Type of change

  • Bugfix

Is it a breaking change?

  • No

How Has This Been Tested?

  • tested manually

In order to test this, you'll need to do the following:

  1. Inside the liquid project working directory, check out the branch fix/resolve_esm
  2. Run yarn && yarn build && npm link
  3. Clone https://github.com/emdgroup-liquid/liquid-sandbox-cra-tailwind
  4. Delete patch-package ; in this line in the package.json file
  5. Run npm install && npm link @emdgroup-liquid/liquid && npm start
  6. Open http://localhost:3000 in your browser

You can test the Vue bindings as well, using the same procedure as above with the Nuxt sandbox app. However, Nuxt will not be able to resolve symlinks, so you will have to copy paste the vue dist folder into the project as a workaround.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • New and existing tests pass locally with my changes

@vercel
Copy link

vercel bot commented Feb 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
liquid ✅ Ready (Inspect) Visit Preview Feb 3, 2023 at 5:04PM (UTC)

@borisdiakur borisdiakur requested review from renet and toastedtoast and removed request for renet February 3, 2023 17:04
@borisdiakur borisdiakur merged commit 3f25d51 into main Feb 6, 2023
@borisdiakur borisdiakur deleted the fix/resolve_esm branch February 6, 2023 15:05
borisdiakur added a commit to emdgroup-liquid/liquid-sandbox-nuxt-tailwind that referenced this pull request Feb 6, 2023
@borisdiakur
Copy link
Contributor Author

🎉 This PR is included in version 4.4.3 🎉

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.

bug: Can't resolve react-component-lib since v4.0.0
2 participants