Create a new javascript file is doesn't work

Hello everyone,

I’m trying to redesign my own theme by creating my own scss & js files.
First of all i’ve find this guide and followed every steps in it;

https://developer.shopware.com/docs/guides/plugins/plugins/storefront/add-custom-javascript.html

But still there’s some problem which is the compiler doesn’t compile my custom javascript file.

1- I’ve created theme.json custom/plugins/JsCss/src/Resources/theme.json
2- main.js custom/plugins/JsCss/src/Resources/app/storefront/src/main.js
path => import '/js/script.js';
3- script.js custom/plugins/JsCss/src/Resources/app/storefront/src/js/script.js

    console.log("JsCss Plugin Loaded!");
    alert("JsCss is working!");
});

After all this changes i’ve tried to compile my theme via bin/console theme:compile
Normally it should create some folder in public/bundles but it didn’t work so i need some help to fix it. Thanks for your time

bin/console theme:compile is for compiling SCSS.

bin/build-storefront.sh is for compiling JS.

This is clearly written in the documentation you have mentioned.

Hi, During custom plugin development, we run the command bin/console theme:compile to compile SCSS. For JavaScript, you need to compile it using bin/build-storefront.sh, as mentioned here: Shopware Developer Guide.