Installing your own dependencies via NPM

Hi again!
Another question about ShopWare6.
I try to install some dependencies via NPM to my Shopware. I use this instruction:
and it works with „missionlog“ module.
I wish to install swiper from My steps:

  1. Go to /src/Resources/app/storefront
  2. Run: npm init -y
  3. Installing the package: npm install --save swiper
  4. Create file: /src/Resources/app/storefront/build/webpack.config.js with content:
const { join, resolve } = require('path'); 
module.exports = () => { 
    return { 
        resolve: { 
            alias: { 
                '@swiper': resolve( 
                    join(__dirname, '..', 'node_modules', 'swiper') 
  1. In my js file import swiper:
import Plugin from 'src/plugin-system/plugin.class';
import { Swiper } from '@swiper';
  1. Run: ./psh.phar storefront:build from my root directory.

But after that I got errors:

Module not found: Error: Can’t resolve ‚dom7‘ in '/src/Resources/app/storefront/node_modules/swiper/shared
Module not found: Error: Can’t resolve ‚ssr-window‘ in ‚/src/Resources/app/storefront/node_modules/swiper/core‘
Second one repeats 21 times with different files and pathes from /swiper/ dir.

Thanks a lot for any help!