vue-datepicker icon indicating copy to clipboard operation
vue-datepicker copied to clipboard

Style loading result in 404

Open MantarySlayer opened this issue 3 years ago • 4 comments

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

<style>
@import '[email protected]/vue-datepicker/dist/Datepicker.css';
</style>

but when I'm refreshing my page, in console, I got this error : GET https://my-url/[email protected]/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 avatar Jun 13 '22 10:06 MantarySlayer

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

MantarySlayer avatar Jun 13 '22 10:06 MantarySlayer

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

MantarySlayer avatar Jun 13 '22 10:06 MantarySlayer

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 🤔

MrWook avatar Jun 15 '22 08:06 MrWook

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

MantarySlayer avatar Jun 15 '22 13:06 MantarySlayer