Skip to content

Update "Adding NPM dependencies" guide for Shopware 6.7 Vite migration#2246

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/update-npm-dependencies-docs
Draft

Update "Adding NPM dependencies" guide for Shopware 6.7 Vite migration#2246
Copilot wants to merge 3 commits intomainfrom
copilot/update-npm-dependencies-docs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 16, 2026

The NPM dependencies guide was outdated: it described registering packages via webpack.config.js for both Administration and Storefront, but the Administration migrated from Webpack to Vite in 6.7.

Changes

  • Removed the outdated YouTube video (webpack alias approach, no longer applicable to admin)
  • Added Administration (6.7+ / Vite) section: Vite resolves plugin node_modules automatically via standard Node.js resolution — no custom build config required for basic npm usage
  • Optional vite.config.mts example for custom config (e.g. aliases), clarifying it lives in src/ next to the entry file while package.json stays at administration/:
// <plugin root>/src/Resources/app/administration/src/vite.config.mts
import { defineConfig } from 'vite';

export default defineConfig({
    resolve: {
        alias: {
            '@my-module': 'src/my-module',
        },
    },
});
  • Kept Storefront (Webpack) section unchanged — Storefront still uses Webpack and requires webpack.config.js in build/
  • Updated build commands: composer build:js:admin for admin (replaces ./bin/build-administration.sh), ./bin/build-storefront.sh for storefront
  • Added cross-reference to the Webpack to Vite migration guide

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • developer.shopware.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI and others added 2 commits April 16, 2026 14:43
- Remove outdated webpack-based approach for the Administration
- Add new Administration section explaining Vite handles npm package resolution automatically
- Add optional vite.config.mts example for custom configuration
- Keep Webpack approach for the Storefront (still webpack-based)
- Update build commands (composer build:js:admin for admin, ./bin/build-storefront.sh for storefront)
- Remove outdated YouTube video reference showing webpack approach
- Add link to Webpack to Vite migration guide

Agent-Logs-Url: https://github.com/shopware/docs/sessions/07bcf0eb-b3cc-4003-919c-f691029a5fd0

Co-authored-by: Isengo1989 <8600299+Isengo1989@users.noreply.github.com>
- Add note clarifying that vite.config.mts is placed in src/ (next to entry file) while package.json stays in administration/
- Replace placeholder absolute path with realistic relative path in alias example

Agent-Logs-Url: https://github.com/shopware/docs/sessions/07bcf0eb-b3cc-4003-919c-f691029a5fd0

Co-authored-by: Isengo1989 <8600299+Isengo1989@users.noreply.github.com>
Copilot AI changed the title [WIP] Update docs for npm dependencies based on vue update in 6.7 Update "Adding NPM dependencies" guide for Shopware 6.7 Vite migration Apr 16, 2026
@Isengo1989
Copy link
Copy Markdown
Contributor

Jannis Leifeld (@jleifeld) I let Copilot take a look at this -> #2244

Could you please cross-verify / refine this? We do have a migration guide, but never adjusted this article. If this was on purpose a short info would be helpful 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin @ct-admin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: "Adding npm dependencies" outdated

2 participants