unplugin-vue-components icon indicating copy to clipboard operation
unplugin-vue-components copied to clipboard

An option that controls the import order of components

Open eiinu opened this issue 2 years ago • 1 comments

Clear and concise description of the problem

Code

// page1.vue
<template>
  <prefix-button>
  <prefix-card>
</template>

// page2.vue
<template>
  <prefix-card>
  <prefix-button>
</template>

Result

// page1.js
import 'button.css'
import 'card.css'

// page2.js
import 'card.css'
import 'button.css'

And then webpack plugin mini-css-extract-plugin will throw errors

[mini-css-extract-plugin] Conflicting order.

Suggested solution

Is it possible to control the order in which components are imported in each file?

For example, import according to the string order of component names as an optional value.

Alternative

No response

Additional context

No response

Validations

  • [X] Follow our Code of Conduct
  • [X] Read the Contributing Guide.
  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

eiinu avatar Jul 24 '23 10:07 eiinu

need reproduction

lishaobos avatar Jul 27 '23 10:07 lishaobos