-
Notifications
You must be signed in to change notification settings - Fork 143
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 internal build script #706
Conversation
@@ -59,8 +59,7 @@ const main = async () => { | |||
|
|||
try { | |||
// Get a list of files from the `npm pack --dry-run` command. | |||
const packageFiles = await packlist() | |||
|
|||
const packageFiles = (await packlist()).filter((path) => !path.startsWith('dist')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This single line change is the key of this PR. (the rest is just maintenance.)
@@ -2,20 +2,16 @@ | |||
"name": "pwa-kit-react-sdk", | |||
"version": "2.3.0-dev", | |||
"description": "A library that supports the isomorphic React rendering pipeline for Commerce Cloud Managed Runtime apps", | |||
"main": "dist/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove it because we don't have this file in the dist folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
There is an issue when you run
npm run build
incommerce-sdk-react
, the build in/dist
has a weird folder structure where there is double/dist
.This happens because the package.json has a
main
field fordist/index.js
to specify the main entry point (this file doesn't exist in other public libraries because this is the first library in the mono repo that has an index file default export.) The PR fixes this by not copy the files that is already in dist.Types of Changes
Changes
How to Test-Drive This PR
cd packages/commerce-sdk-react && npm run build
you should have a
/dist
folder that look like this:Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization