Skip to content

Commit

Permalink
FIx outdated JS paths in theme.json for 6.6 (#1684)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasberge authored Feb 5, 2025
1 parent 484ddfc commit 643a860
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion guides/plugins/themes/add-css-js-to-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Add some test code in order to see if it works out:
console.log('SwagBasicExampleTheme JS loaded');
```

In the end, by running the command `bin/build-storefront.sh` your custom JS plugin is loaded. By default, the compiled JavaScript file is saved as `<plugin root>/src/resources/app/storefront/dist/storefront/js/swag-basic-example-theme.js`. It is detected by Shopware automatically and included in the Storefront. So you do not need to embed the JavaScript file yourself.
In the end, by running the command `bin/build-storefront.sh` your custom JS plugin is loaded. By default, the compiled JavaScript file is saved as `<plugin root>/src/resources/app/storefront/dist/storefront/js/swag-basic-example-theme/swag-basic-example-theme.js`. It is detected by Shopware automatically and included in the Storefront. So you do not need to embed the JavaScript file yourself.

## Using the hot-proxy \(live reload\)

Expand Down
3 changes: 2 additions & 1 deletion guides/plugins/themes/create-a-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ Now your theme is fully installed, and you can start your customization.
│ │ ├── dist
│ │ │ └── storefront
│ │ │ └── js
│ │ │ └── swag-basic-example-theme.js
| | | └── swag-basic-example-theme
│ │ │ └── swag-basic-example-theme.js
│ │ └── src
│ │ ├── assets
│ │ ├── main.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This entry point is called `overrides.scss`:
],
"script": [
"@Storefront",
"app/storefront/dist/storefront/js/just-another-theme.js"
"app/storefront/dist/storefront/js/just-another-theme/just-another-theme.js"
],
"asset": [
"@Storefront",
Expand Down
6 changes: 3 additions & 3 deletions guides/plugins/themes/theme-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The theme configuration for a theme is located in the `theme.json` file `<plugin
],
"script": [
"@Storefront",
"app/storefront/dist/storefront/js/swag-basic-example-theme.js"
"app/storefront/dist/storefront/js/swag-basic-example-theme/swag-basic-example-theme.js"
],
"asset": [
"@Storefront",
Expand Down Expand Up @@ -318,7 +318,7 @@ A custom single-select field example
],
"script": [
"@Storefront",
"app/storefront/dist/storefront/js/select-example.js"
"app/storefront/dist/storefront/js/select-example/select-example.js"
],
"asset": [
"@Storefront",
Expand Down Expand Up @@ -409,7 +409,7 @@ A custom multi-select field example
],
"script": [
"@Storefront",
"app/storefront/dist/storefront/js/select-example.js"
"app/storefront/dist/storefront/js/select-example/select-example.js"
],
"asset": [
"@Storefront",
Expand Down

0 comments on commit 643a860

Please sign in to comment.