fix: Restores old build output by removing package.json import #2596
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Reverts the package.json import from
import
torequire
Removes
resolveJsonModules
fromtsconfig.json
Motivation and Context
Fixes #2593
By including
resolveJsonModules: true
and usingimport
for thepackage.json
in theindex.ts
for the cli dir, we ended up introducing an extra level into the build output as including the json import hoisted thesrc
dir intodist
.Fixed by restoring the previous code and ignoring the lint error.
Will follow-up with a new PR to get the version text in a different manner
Previous Behaviour / Output
Old dist output:
![image](https://private-user-images.githubusercontent.com/10782902/329967274-6a45cb4b-097a-4802-b9a5-51370224228b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2Mzk1MTIsIm5iZiI6MTczOTYzOTIxMiwicGF0aCI6Ii8xMDc4MjkwMi8zMjk5NjcyNzQtNmE0NWNiNGItMDk3YS00ODAyLWI5YTUtNTEzNzAyMjQyMjhiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE3MDY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY1ZDVjN2E1YzY1NzZlMGRjNjBhOGU2YWQzOTQwZDk5ODlkMjkyOWRiNjYzYjFjNWM1ZTNkZDYwNjEwNDY2N2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.GgTdam8Yw0r5qKIQJAKFB-14ap9vbgpUUi1pS9znB2g)
New Behaviour / Output
Current output:
![image](https://private-user-images.githubusercontent.com/10782902/329967845-d28609fd-200f-4334-996b-c8a8385a0fc0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2Mzk1MTIsIm5iZiI6MTczOTYzOTIxMiwicGF0aCI6Ii8xMDc4MjkwMi8zMjk5Njc4NDUtZDI4NjA5ZmQtMjAwZi00MzM0LTk5NmItYzhhODM4NWEwZmMwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE3MDY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE0MzZlMjQxODFmYTYwNWM4OTc0YzM1MDdiYzA1MjU3MzcwMTZiNWE3YjM1NDIxMDhlYmUyYjJmYTc4M2I5OWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.L-1NTk2aBc03-bJXXN6sCOwjkT1wDdcfNsHNA2C1gg0)
How Has This Been Tested?
src
dir is not in the build outputScreenshots (if appropriate):