sumcumo / vue-datepicker

A datepicker Vue component. Compatible with Vue 2.x.
https://sumcumo.github.io/vue-datepicker/
Apache License 2.0
75 stars 22 forks source link

Style loading result in 404 #152

Open MantarySlayer opened 2 years ago

MantarySlayer commented 2 years ago

I'm trying to import style as you said in your docs :

<style>
@import '~@sum.cumo/vue-datepicker/dist/Datepicker.css';
</style>

but when I'm refreshing my page, in console, I got this error : GET https://my-url/~@sum.cumo/vue-datepicker/dist/Datepicker.css [HTTP/1.1 404 Not Found 32ms]

FYI, css-loader is installed and work with others css, but I think it's about the link to css file

MantarySlayer commented 2 years ago

And when I'm trying with sass file, I got 404 too

MantarySlayer commented 2 years ago

I found that trying to do :

import '@sum.cumo/vue-datepicker/src/styles/style.scss'

in the same file where I import the date-picker works. Maybe need a review / fix about it, or I'm doing something wrong but don't see the problem.

But the style still don't work. It's imported, but not applied to the date picker, which result into this : image

MrWook commented 2 years ago

For me it seems like you are missing the configuration to resolve modules. I'm not sure but i think you need to enable options: { modules: true, }, in the css loader 🤔 Did you try to import it inside the script tag? This should normally work 🤔

MantarySlayer commented 2 years ago

For ccs loader, I don't really know, I'm on a project and I never seen how it really works. I'll look for it.

For import, thing is my imports are in JS files that work as a bundle, with many imports and we import the JS file we need, so we don't load everything.

Here is my import in bundle : image