After build the js file does not exists

I created a file called cms.bundle.js inside the cms/public/js directory and then ran the build command using the following command:

bench build --app cms

The output indicated that the application assets were linked successfully.

✔ Application Assets Linked


yarn run v1.22.19
$ node esbuild --apps cms --run-build-command
clean: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
clean: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
clean: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
clean: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
File                                                        Size

cms/dist/js/
├─ cms.bundle.XN2GKAVI.js                                   653.23 Kb
└─ cms.bundle.P2WL3AH3.css                                  24.30 Kb

 DONE  Total Build Time: 383.408ms

✨  Done in 1.04s.

Afterwards, I tried to load the file using the following code:

frappe.require('cms.bundle.js').then(() => {})

However, I encountered an error message that said,

FileNotFoundError: [Errno 2] No such file or directory: './assets/cms/dist/js/cms.bundle.XN2GKAVI.js'

What am I doing wrong here?