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

Add windows folder to file list #14134

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

TatianaKapos
Copy link
Contributor

@TatianaKapos TatianaKapos commented Nov 22, 2024

Description

adds windows folder to file list to correctly publish to npm

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Why

Resolves #14110

Changelog

yes

Fixes library temples adding the correct files in npm packages

Microsoft Reviewers: Open in CodeFlow

@TatianaKapos TatianaKapos requested a review from a team as a code owner November 22, 2024 22:31
@microsoft-github-policy-service microsoft-github-policy-service bot added Area: Library Template Area: Turbo Modules New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric labels Nov 22, 2024
@TatianaKapos
Copy link
Contributor Author

@jonthysell lmk if this is the right package.json! I didn't find one in the templates folder

@jonthysell
Copy link
Contributor

@jonthysell lmk if this is the right package.json! I didn't find one in the templates folder

oh, sorry, you'll need to modify the template.config.js line where we modify the project's existing package.json file:

await templateUtils.updateProjectPackageJson(libConfig, libOptions, {

though in fact, that function just merges things into the json and it may overwrite what's already there. I think you'll have to write a new custom helper (or modify the existing one with a flag) that reads in the package.json, checks if they're using a "files" filter, and then inject "windows" into the array if it isn't already present

@TatianaKapos TatianaKapos marked this pull request as draft November 22, 2024 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Library Template Area: Turbo Modules New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Library templates aren't including the correct files in npm packages
2 participants