WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.21k forks source link

A Way to Disable Export Theme #46661

Open unsalkorkmaz opened 1 year ago

unsalkorkmaz commented 1 year ago

What problem does this address?

This button tries to zip my whole theme which as node_modules with 500MB content: Screenshot 2022-12-19 at 20 03 38

What is your proposed solution?

I need a way to disable this.

t-hamano commented 1 year ago

@unsalkorkmaz Thanks for your reporting.

My understanding is that the node_modules directory is explicitly excluded and I could not reproduce this in my environment.

We would be happy to receive more information on WordPress version, Gutenberg plugin version, OS, etc.

unsalkorkmaz commented 1 year ago

My node_modules is in directory.

wp-content/themes/theme_name/headless/node_modules

I will post a video today

unsalkorkmaz commented 1 year ago

Here is the video: https://www.youtube.com/watch?v=9F1LtmMrjsY (new uploaded, proccessing atm)

You can see CPU spike in right macos m1 menu..

unsalkorkmaz commented 1 year ago

And lets say I want to give demo for my premium theme.. Why the hell would I want a download button?

t-hamano commented 1 year ago

@unsalkorkmaz

Thank you for the detailed explanation. Indeed, it seems that the node_modules directory in the sub directory will be included. I was also able to reproduce the following commands:

The increase in CPU load and the time it takes to run Export is probably due to the large number of files being scanned.

I think it might be a good idea to submit a core ticket since the theme export feature is already in the WordPress core and I believe it is a PHP side issue.

unsalkorkmaz commented 1 year ago

Ok. I opened a ticket; https://core.trac.wordpress.org/ticket/57379#ticket