Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Mandatory extension support for builds #1759

Merged
merged 2 commits into from
Mar 4, 2021
Merged

Conversation

ismail-syed
Copy link
Contributor

@ismail-syed ismail-syed commented Mar 1, 2021

Description

This PR update our build system to support mandatory file extensions. While exploring snowpack and swc, we hit issues where those respective bundlers couldn't parts our mjs and esnext builds. This PR fixes that.

This PR fixes the following errors we get when running quilt packages in a webpack 5 react app:

Module not found: Error: Can't resolve './build/esm/index' in 'node_modules/@shopify/react-form'"

🎩

  • yarn run clean && yarn run build to run a fresh build

  • Peek into a esm build to verify the .mjs extensions (eg. packages/react-html/build/esm/common.mjs)
    image

  • Peek into an esnext build to verify the .esnext extensions (eg. packages/react-html/build/esnext/common.esnext)
    image

  • Peek into a cjs build to verify the relative .js extensions (eg. quilt/packages/react-html/build/cjs/common.js)
    image

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above (Documentation fix and Test update does not need a changelog as we do not publish new version)

@ismail-syed ismail-syed deployed to beta-mandatory-extensions March 2, 2021 19:35 Active
@ismail-syed ismail-syed force-pushed the sk1-mandatory-extensions branch from 4927533 to efc31b6 Compare March 3, 2021 21:34
@ismail-syed ismail-syed marked this pull request as ready for review March 3, 2021 21:40
@ismail-syed ismail-syed requested a review from BPScott March 3, 2021 22:41
Copy link
Member

@BPScott BPScott left a comment

Choose a reason for hiding this comment

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

Haven't thumbed through every package but it looks like sk is now indeed providing full paths!

@ismail-syed ismail-syed merged commit ebd734f into main Mar 4, 2021
@ismail-syed ismail-syed deleted the sk1-mandatory-extensions branch March 4, 2021 04:16
@ismail-syed ismail-syed temporarily deployed to production March 4, 2021 05:04 Inactive
@michenly michenly temporarily deployed to michenly-beta March 9, 2021 22:37 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to gem June 23, 2021 20:18 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants