Reputation: 582
I have a vuetify project (Windows / VSCODE).
Our plan is to create components for our internal teams to use - no NPM.
I created a hello-world.vue component and ran a script (below) from package.json to create a dist folder with that component. This works fairly well, but in another application demo.html or such the Vuetify Button v-btn does not have any of the styling from vuetify... The script creates the individual components based off the vue file.
script executed to generate components "buildSFC": "cross-env vue-cli-service build --target wc --name jcdc-sfc 'src/components/*.vue'"
What am I missing to get VUETIFY styling and such?
See GIT HUB for code: https://github.com/wlafrance/jcdc-sfc If you pull the git down, in a vue command line execute this script: npm run buildSFC Then look for a dist folder in the project and open the html file in chrome to see the issue. So see what it is suppose to look like (the button) execute: nmp run serve
Upvotes: 1
Views: 332
Reputation: 1386
Your publicPath in vue.config.js
probably defaults to /
which is you root drive. So if you have it running on Windows and on your C: drive then your demo.html
will look in C:\ for the files.
Add a publicPath: "./"
to your vue config.
Also check your package-json scripts. buildLib
has a ./src/
but buildSFC
does not.
Upvotes: 1