Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix outdated JS paths in theme.json for 6.6 #1684

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading