Skip to content

Infinite builds loop fix - #150

Merged
ashfame merged 6 commits into
schema-files-buildfrom
infinite_builds_loop_fix
Dec 11, 2024
Merged

Infinite builds loop fix#150
ashfame merged 6 commits into
schema-files-buildfrom
infinite_builds_loop_fix

Conversation

@ashfame

@ashfame ashfame commented Dec 11, 2024

Copy link
Copy Markdown
Member

In this PR, we decided to not drop a generated file into src dir for WP so as to avoid the situation of generated file re-triggering a build.

schema.json is now only generated under schema dir and copied to the right places under the build dir. And is now also configured to be ignored by webpack's watching for changes.

This resolves the infinite loop of building assets.

@psrpinto psrpinto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread webpack.config.cjs
@ashfame
ashfame merged commit acdbbe7 into schema-files-build Dec 11, 2024
@ashfame
ashfame deleted the infinite_builds_loop_fix branch December 11, 2024 15:27
@psrpinto

Copy link
Copy Markdown
Member

I was thinking: Now that we found the way to exclude paths from the watcher, we could also have webpack copy the schema.json into src/plugin, assuming you want that to happen.

@ashfame

ashfame commented Dec 11, 2024

Copy link
Copy Markdown
Member Author

@psrpinto Good point! I will try that in a separate PR :)

@psrpinto

Copy link
Copy Markdown
Member

We ended up pushing that change in #148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants