sagalbot / vue-select

Everything you wish the HTML <select> element could do, wrapped up into a lightweight, extensible Vue component.
https://vue-select.org
MIT License
4.62k stars 1.33k forks source link

Missing `src` directory when installing as dependency #1691

Open ezoterik opened 1 year ago

ezoterik commented 1 year ago

Describe the bug

README.md file has this text:

Alternatively, you can import the scss for complete control of the component styles: @import "vue-select/src/scss/vue-select.scss";

But I don't have the src directory (I have only dist folder) because of the added option "files" in the package.json file (in v4.0.0-beta.4)

    "files": [
        "dist"
    ],

Expected behavior

I'm not sure if this is a bug. This may have been intended, but the documentation has not been updated. Is there any way to add a dependency to my project along with the src directory?

joubu commented 1 year ago

Switched from beta3 to beta5 and I am now getting Failed to resolve component: v-select. Is it coming from this missing 'src' directory?

sagalbot commented 1 year ago

@joubu can you post a reproduction?

joubu commented 1 year ago

@joubu can you post a reproduction?

import { createApp } from "vue";
import vSelect from "vue-select";
import App from "./App.vue";
const app = createApp(App);
app.component("v-select", vSelect);
app.mount("#app");

This works in beta3, not beta5 where I am seeing

[Vue warn]: Failed to resolve component: v-select
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. 
  at <App>

I guess #1701 will fix this, thanks!