Skip to content

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

Merged
Micha Hobert (Isengo1989) merged 2 commits intomainfrom
copilot/update-npm-dependencies-docs
Apr 22, 2026
Merged

Update "Adding NPM dependencies" guide for Shopware 6.7 Vite migration#2246
Micha Hobert (Isengo1989) merged 2 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 linked an issue Apr 16, 2026 that may be closed by this pull request
1 task
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 🙂

@Isengo1989 Micha Hobert (Isengo1989) marked this pull request as ready for review April 22, 2026 08:11
Copilot AI review requested due to automatic review settings April 22, 2026 08:11
Copilot AI and others added 2 commits April 22, 2026 10:11
- 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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the “Adding NPM dependencies” plugin guide to reflect the Shopware 6.7 Administration migration from Webpack to Vite, while keeping the Storefront Webpack workflow intact.

Changes:

  • Replaces the outdated video/webpack-based Administration guidance with a Vite-based Administration section (6.7+).
  • Adds an optional vite.config.mts example and clarifies file locations (src/ vs administration/).
  • Updates build instructions and adds a cross-reference to the Webpack→Vite migration guide.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Isengo1989 Micha Hobert (Isengo1989) merged commit 7384527 into main Apr 22, 2026
8 checks passed
@Isengo1989 Micha Hobert (Isengo1989) deleted the copilot/update-npm-dependencies-docs branch April 22, 2026 08:57
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

4 participants