nuxt3-class-component icon indicating copy to clipboard operation
nuxt3-class-component copied to clipboard

Warning: Export "mixins" ... will end up in different chunks

Open IlyaSemenov opened this issue 1 year ago • 0 comments

nuxt build emits warnings:

Export "mixins" of module "../../node_modules/.pnpm/[email protected][email protected]/node_modules/vue-facing-decorator/dist/esm/mixins.js" was reexported through module "../../node_modules/.pnpm/[email protected][email protected]/node_modules/vue-facing-decorator/dist/esm/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. #20 52.73 Either change the import in "components/filters/DatesFilterFields.vue?vue&type=script&lang.ts" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.

The code is as simple as:

import { Component, mixins, Prop } from 'nuxt-property-decorator'

class DatesFilterFields extends mixins(FilterComponentMixin) {}

with the mixin defined like:

import { ComponentBase, Inject, Vue } from 'nuxt-property-decorator'

@ComponentBase
class FilterComponentMixin extends Vue {}

IlyaSemenov avatar Jul 04 '23 09:07 IlyaSemenov