BATOOL ALSULH
BATOOL ALSULH

Reputation: 79

Using Vue package in Administration component Shopware 6

I want to use an Vue package like this Vue.use(npmPackageName) but when I import vue form 'vue' this message appear "Can’t resolve vue" my question is how can I use npm package in the administration component? thanks a lot.

this is the npm_modules folder

enter image description here

and this is the webpack.config.js file enter image description here

here is how i try to import and use it enter image description here

Upvotes: 1

Views: 722

Answers (1)

Alex
Alex

Reputation: 35008

Yes, you can.

You have to add the package to your own module's package.json and the build-administration.sh would install the dependencies.

This works only, if jq is installed on your system - otherwise a warning is printed which can be overseen easily.

Upvotes: 1

Related Questions