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

Scripts: Fix Entry points are not detected in Windows OS #38781

Merged
merged 4 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
### Bug Fix

- Return a default entry object in the `build` command when no entry files discovered in the project ([#38737](https://github.com/WordPress/gutenberg/pull/38737)).
- Entry points are not detected in Windows OS ([#38781](https://github.com/WordPress/gutenberg/pull/38781)).

## 21.0.0 (2022-02-10)

Expand Down
3 changes: 2 additions & 1 deletion packages/scripts/utils/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ function getWebpackEntryPoints() {
}
const entryName = filepath
.replace( extname( filepath ), '' )
.replace( srcDirectory, '' );
.replace( srcDirectory, '' )
.replace( /\\/g, '/' );

// Detects the proper file extension used in the `src` directory.
const [ entryFilepath ] = glob(
Expand Down