vuejs / rollup-plugin-vue

Roll .vue files
https://vuejs.github.io/rollup-plugin-vue
MIT License
843 stars 148 forks source link

Child components not rolling up #391

Closed mjmnagy closed 4 years ago

mjmnagy commented 4 years ago

Version

5.0.0

Reproduction link

https://github.com/mjmnagy/error-sept-10-2020

Steps to reproduce

  1. npm run rollup:inline
  2. Include rolled up docs to node_modules
  3. Set status of component 'input-number' to true
  4. The 'stat-us' component is not loaded

What is expected?

load the mixin into the file

Within a component you will have child components like to

components: {
    'cir-cle': () => import('@inputs/slider/circle.vue')   //Read rollup has a hard time resolving so added .vue
    //This is a circle on a slider component (there can be two circles if it is a range therefore imported as a comp.)
  }

To be included in the rolled up files

What is actually happening?

Update Aliases have been added to all these child component to enable absolute paths instead of relative.

entry.js -> entry for rollup does not include or mention the child components as they are not supposed to be global or individually exposed outside of their parent component.

Having the child component in the mixin or outside actually has no baring.

Added packages rollup-plugin-node-resolve rollup-plugin-local-resolve

Nada

Ive been browsing the options for the plugin and do not see anything relating to child components expect maybe customBlocks <- If this is the option would you need to add each child(which are not globally available)?

mjmnagy commented 4 years ago

Due to lazy loading child components

import autoStat from '@inputs/shared/status/auto'

export default {
  components: {
    autoStat //works
    hiddenStat: () => import('@inputs/shared/status/hidden') //doesnt work
  },
}
webistomin commented 3 years ago

Due to lazy loading child components

import autoStat from '@inputs/shared/status/auto'

export default {
  components: {
    autoStat //works
    hiddenStat: () => import('@inputs/shared/status/hidden') //doesnt work
  },
}

@mjmnagy, how did you solve the problem?

mjmnagy commented 3 years ago

Due to lazy loading child components

import autoStat from '@inputs/shared/status/auto'

export default {
  components: {
    autoStat //works
    hiddenStat: () => import('@inputs/shared/status/hidden') //doesnt work
  },
}

@mjmnagy, how did you solve the problem?

import hiddenStat from '@inputs/shared/status/hidden'

The lazy imports did not ever work for me