[wp-trac] [WordPress Trac] #61575: Node Modules in sub-directories not getting ignored while exporting the theme

WordPress Trac noreply at wordpress.org
Fri Jul 5 02:53:40 UTC 2024


#61575: Node Modules in sub-directories not getting ignored while exporting the
theme
----------------------------+------------------------------
 Reporter:  rajinsharwar    |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:
----------------------------+------------------------------

Comment (by peterwilsoncc):

 It's difficult to know the developer's intent with regard to exporting
 `node_modules`.

 As NPM packages include both production and development dependencies, it's
 possible the intent is to include the folder as it contains code required
 for production websites.

 If the theme directory includes NPM or yarn config files, it might be safe
 to assume that the node_modules folder can be excluded and require it be
 run upon deploy. If it doesn't then I think we certainly want to retain
 node_modules.

 The complicating factor is when accounting for uploading of themes. If the
 folder doesn't include node_modules and the site owner has no way of
 running it then there is a risk of breaking sites.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61575#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list