Synonypsis
Please allow me to explain what is going on. I did the following:
- made custom Vue components using Vuetify components
- made a custom Vue component using these Vuetify components and the custom components from (1)
- used rollupjs to bundle these components together
- published these components on npm
- deployed to GitLab pages an example of the "main" component from (2), using the local version of the component (rather than the one from npm)
- made a new nuxt project
- dockerized it
- I install my package from (4) and use it
- deployed this test repository on GitLab pages
What happened that inspired this post:
1. On the component's repository GitLab page (step 5 from above), the component is both rendered and mounted
2. On the test repository GitLab page (step 9 from above), the component is mounted but the template is not rendered (e.g. it is like its template tag <my-component></my-component>
)
3. In the test repository, using docker in development everything is ok
4. In the test repository the component is mounted but not rendered
Details
The offending component is called VRecordsTable
from the package valpha
. It is a wrapper of the Vuetify component VDataTable
and adds custom slots, logic and a few other components. (links below).
The component is mounted in production (the data is there, reactive via vuex store also works), but the html is as follows:
<v-col><v-data-table page="0" items-per-page="5" items="record1,record2,record3,record4,record5,record6,record7,record8,record9" calculate-widths="true" fixed-header="" headers-length="7"></v-data-table></v-col>
Here is an image from the linked test repo below showing what I mean:
Notice, the component is mounted with data all there, but unlike all the other components, it doesn't have a drop down to see the internal components.
I'm not sure where I went wrong, at the bottom of this post is quick links to the repo of both the component and the test repo, in addition to useful files like rollup.config.js
Useful commands
For docker in the test repo please use:
# dev
docker-compose -f docker-compose.development.yml build
docker-compose -f docker-compose.development.yml up
docker-compose -f docker-compose.development.yml down
# prod
docker-compose -f docker-compose.production.yml build
docker-compose -f docker-compose.production.yml up
docker-compose -f docker-compose.production.yml down
Links
component repo:
test repo
Hunchs
- something with
npm run start
vsnpm run dev
/ how nuxt is built is the issue? - something with how I configured rollup.config.js is the issue?
- something with vuetify is the issue?