Files in build directory no longer working as expected

[ad_1]

I have asked this same question on the WordPress StackExchange here: https://wordpress.stackexchange.com/questions/427227/files-in-build-directory-no-longer-working-as-expected

As I am desperate for an answer, I have the same question below:

I have a serious issue with the files in my build directory after running the wp-scripts build command. None of them work when I try to run my plugin. The build directory used to have files along the lines of index.js, `index.js.map`, index.css, and index.css.map. Now, I have files that are named 134.css134.js, and 855.js, just to name a few. I still have index.js and can find the other files being referenced in index.js.

The problem is, when I uploaded the new files to my live site, it completely broke my plugin. I've reset the permalinks from the dashboard without success (trying anything at this point). If you go to this page, try clicking either the "Customize and Buy" or the "Order Sample" buttons and you'll see that nothing happens. Also, they look like normal buttons without any of my css. https://www.areapublic.com/product/willows/

This is a major issue for me and I really need this solved ASAP. I have updated all of my node modules, and this plugin does not rely on any other plugins to work. It has worked just fine with the current list of plugins. The site is using the most recent version of WordPress and should still work with the most recent modules that I updated today.

Please help!

Edited to add:

I have the following lines of code to load my build files on the site:

wp_enqueue_script('area-public-visualizer', plugin_dir_url(__FILE__) . 'build/index.js');
wp_enqueue_style('area-public-visualizer', plugin_dir_url(__FILE__) . 'build/index.css');

While I still have my index.js as mentioned earlier, I no longer have my index.css and no longer feel I can rely on the wp-scripts build command to not change the name of my css files in the future.

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer