vueform / multiselect

Vue 3 multiselect component with single select, multiselect and tagging options (+Tailwind CSS support).
https://vueform.com
MIT License
808 stars 151 forks source link

css file is not imported #325

Closed uzaneran closed 1 year ago

uzaneran commented 1 year ago

Hi, I have a vue-3 app using vueform-multiselect and it looks like there's an issue with the css file import image

In another computer of mine it works properly

I don't know how it's possible.

thanks, Eran.

arrocke commented 1 year ago

We are seeing this as well on version 2.6.1. Version 2.6.0 does not have the issue. I suspect it is due to the addition of the exports field in package.json. Trying to reproduce in codesandbox right now

Fli-c commented 1 year ago

I believe the cause is sideEffects flag, https://github.com/vueform/multiselect/blob/e3ca5e649a9bcbd53555d7ee1cfa47be3808bc12/package.json#L37 It can be overridden in local package.json like this

...
module: {
    rules: [
        ...,
        {
            include: path.resolve('node_modules', '@vueform', 'multiselect'),
            sideEffects: true,
        },
    ],
},

Although this will disable webpacks "tree shaking" feature completely. Ideally it should be an array of paths to component css files, but IDE tells me that webpack expects just boolean value here. It'll do for now I guess 🤷‍♂️

adamberecz commented 1 year ago

We no longer have sideEffects: false, so closing this.