docs: document postinstall copy-out workaround for shopware-cli #1466 - #2487
docs: document postinstall copy-out workaround for shopware-cli #1466#2487Soner (shyim) wants to merge 2 commits into
postinstall copy-out workaround for shopware-cli #1466#2487Conversation
Developer Docs healthcheckStatus: Completed with |
945e8ea to
fe96932
Compare
A pure-SCSS theme that imports from `node_modules` (e.g. @fortawesome/fontawesome-free) fails `shopware-cli project storefront-build` because the storefront-root `node_modules` is deleted before `theme:compile` runs. Document the known `postinstall` copy-out workaround in the npm dependencies guide and link to it from the theme styling guide, with a reference to shopware/shopware-cli#1466 for the longer-term fix.
fe96932 to
f7daa36
Compare
📢 Developer Announcement RecommendationRecommendation: ❌ No Announcement Recommended No developer announcement signals were detected.
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Shopware developer documentation to describe a known workaround for shopware-cli project storefront-build when a pure-SCSS theme needs to import assets from npm packages (e.g. Font Awesome) while the upstream shopware-cli issue remains unresolved.
Changes:
- Adds a new “Using npm packages in a pure-SCSS theme (no JS entry point)” section documenting a
postinstall“copy-out” workaround. - Adds a pointer from the theme styling guide to the new workaround section.
- Extends the spellcheck wordlist with
webfonts.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| guides/plugins/themes/styling/add-css-js-to-theme.md | Adds a short section pointing theme authors to the new workaround documentation. |
| guides/plugins/plugins/dependencies/using-npm-dependencies.md | Adds detailed steps and examples for the postinstall copy-out workaround for SCSS-only themes. |
| .wordlist.txt | Adds webfonts to avoid spellcheck failures for the new content. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| } | ||
| ``` | ||
|
|
||
| The script does three things: |
| // <plugin root>/src/Resources/app/storefront/src/scss/base.scss | ||
| @import '../../.vendor/node_modules/@fortawesome/fontawesome-free/scss/fontawesome'; |
There was a problem hiding this comment.
Soner (@shyim) not sure about this, can you check?
There was a problem hiding this comment.
yes thats valid for the referencing .woff files
Micha Hobert (Isengo1989)
left a comment
There was a problem hiding this comment.
Soner (@shyim) Left one comment where I am not sure about, rest looks good to me, thanks for the PR 👍
Just added some code-blocks to avoid inline comments in JSON
| // <plugin root>/src/Resources/app/storefront/src/scss/base.scss | ||
| @import '../../.vendor/node_modules/@fortawesome/fontawesome-free/scss/fontawesome'; |
There was a problem hiding this comment.
Soner (@shyim) not sure about this, can you check?
Documents the known workaround from shopware/shopware-cli#1466 so theme authors can keep using npm packages (e.g.
@fortawesome/fontawesome-free) from SCSS while the upstream fix is still open.Problem
shopware-cli project storefront-buildfails for a pure-SCSS theme that imports fromnode_modulesbecause:npm installfor storefront extensions with a JS entry point, andmain.js, the storefront-rootnode_modulesis removed beforetheme:compileruns.Changes
guides/plugins/plugins/dependencies/using-npm-dependencies.mddescribing thepostinstallcopy-out workaround: emptymain.js,package.jsonpostinstallthat copies SCSS into.vendor/node_modules/...and webfonts intopublic/static/fonts/, updatedtheme.json/SCSSpaths, and.gitignoreentries.guides/plugins/themes/styling/add-css-js-to-theme.mdso theme authors find the workaround from the theme styling guide.webfontsto.wordlist.txt.Quality
make spellcheckpasses.make fix(markdown lint) passes.Refs shopware/shopware-cli#1466.