-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSP Violation #75
Comments
Sorry for the late reply. I have released v1.2.2, which may fix this issue. // in this path vue-easy-lightbox/dist/external-css/*.js
import VueEasyLightbox from 'vue-easy-lightbox/dist/external-css/vue-easy-lightbox.es5.esm.min.js'
// you need to import css yourself
import 'vue-easy-lightbox/external-css/vue-easy-lightbox.css' |
Hey! Thank you very much for the clean fix! Importing in typescript works, but typechecking gives me this error: (importing css doesn't give me any errors) For now I fixed it locally with:
But I think |
I did a search. But haven't found how to add As you mentioned, add declare module 'vue-easy-lightbox/dist/external-css/vue-easy-lightbox.es5.common.min' {
import VueEasyLightbox from 'vue-easy-lightbox'
export default VueEasyLightbox
} The other way, if you're using webpack: // wepback.config.js
module.exports = {
//...
resolve: {
alias: {
'vue-easy-lightbox$': 'vue-easy-lightbox/dist/external-css/vue-easy-lightbox.es5.common.min.js',
},
},
};
// in your component
import VueEasyLightbox from 'vue-easy-lightbox' // work |
Thank you for your advice with aliasing. Will do that. I think it can be added to the docs. |
Yes, docs updated. |
Thank you! Closing the issue now |
Hi @XiongAmao are external-css builds available for vue2 component or only vue3? thanks |
@ekrausso |
@XiongAmao great!! thanks :) |
This package is inlining css, which violates my CSP rules (
default-src 'self'
). I know I can enableunsafe-inline
but this is unsafe and kinda defeats the purpose.Is it possible to bundle this package in some other way?
The text was updated successfully, but these errors were encountered: