Title: Code Splitting with wordpress/scripts
Last modified: April 24, 2024

---

# Code Splitting with wordpress/scripts

 *  [oiver55](https://wordpress.org/support/users/oiver55/)
 * (@oiver55)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/code-splitting-with-wordpress-scripts/)
 * I am developing a site and I have come to a place where certain js file should
   only be loaded for certain pages. For example, I want some js files to only run
   in the dashboard. Currently all my js files get complied into one. Is there a
   writeup that shows how to code split while using the wordpress/scripts library?
   Or maybe do you know how to codesplit js files through wordpress/scripts? Thanks
   for your time.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/code-splitting-with-wordpress-scripts/#post-17714284)
 * How do you combine them? What does your script look like?
 *  Thread Starter [oiver55](https://wordpress.org/support/users/oiver55/)
 * (@oiver55)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/code-splitting-with-wordpress-scripts/#post-17716148)
 * Hey there I was able to figure it out. Thanks for responding!
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/code-splitting-with-wordpress-scripts/#post-17716551)
 * The solution would certainly be interesting for others who are also looking for
   it. You are also welcome to set the topic to solved.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Code Splitting with wordpress/scripts’ is closed to new replies.

## Tags

 * [webpack](https://wordpress.org/support/topic-tag/webpack/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 3 replies
 * 2 participants
 * Last reply from: [threadi](https://wordpress.org/support/users/threadi/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/code-splitting-with-wordpress-scripts/#post-17716551)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
