vue-cli-plugin-p11n icon indicating copy to clipboard operation
vue-cli-plugin-p11n copied to clipboard

Dependency was not found ~entry in ./demo/main.js

Open mszkb opened this issue 5 years ago • 3 comments

In demo/main.js there is import App from '~entry'. When starting the demo script, it produces an error dependency was not found.

Steps to reproduce: Create a new project with vue-cli
vue create my-new-project
Add p11n
vue add p11n
and start the demo
yarn demo

Solution: Change '~entry' to './Demo'

mszkb avatar Jul 18 '19 08:07 mszkb

In lib/demo/plugin.js there is a webpack config line 11 .set('~entry', path.resolve(path.join(context, './demo', entry)))

Maybe something went wrong there.

mszkb avatar Jul 18 '19 08:07 mszkb

It seems that we should run yarn demo Demo.vue or npx vue-cli-service demo Demo.vue

command vue-cli-service demo needs entry option

fangbinwei avatar Mar 26 '20 07:03 fangbinwei

Am I understanding correctly that to work with npm the demo property in package.json script ought to look like

"demo": "vue-cli-service demo ./Demo.vue",

mhirsch avatar Apr 23 '20 17:04 mhirsch