Can I use wildcards in the build.json file for bundling JS?

Like

"js/desk.bundle.js": [
	"public/js/*.js",
]

Hi @zeeeeeeeero,

Yes, you can. The syntax you used in your example is correct.

"js/desk.bundle.js": [
	"public/js/*.js",
]

This will bundle all the JavaScript files in the public/js directory with a .js extension into a single file called desk.bundle.js in the js directory.

Note that when using wildcards, it is important to make sure that the files you want to include in the bundle match the pattern you specify. Also, be mindful of including any third-party libraries that may not be part of your own codebase.

Thank You!

2 Likes