Skip to content

Commit

Permalink
Scripts: Fix Entry points are not detected in Windows OS (#38781)
Browse files Browse the repository at this point in the history
* Scripts: Fix Entry points are not detected in Windows OS

* Update changelog files

* code refactoring

* Let's update the changelog according to the npm publishing planned

Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
  • Loading branch information
t-hamano and gziolo committed Feb 15, 2022
1 parent c504669 commit aa6b58b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/scripts/CHANGELOG.md
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 21.0.2 (2022-02-15)

- Entry points are not detected in Windows OS ([#38781](https://github.com/WordPress/gutenberg/pull/38781)).

## 21.0.1 (2022-02-11)

### Bug Fix
Expand Down
3 changes: 2 additions & 1 deletion packages/scripts/utils/config.js
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

0 comments on commit aa6b58b

Please sign in to comment.