richardtallent / vue-simple-calendar

Simple Vue component to show a month-grid calendar with events
MIT License
883 stars 162 forks source link

missing export in package.json #214

Closed Leubeling closed 2 years ago

Leubeling commented 2 years ago

I have some trouble with import the stylecheat. By example it is described like: import "..relative-path-to-node_modules/vue-simple-calendar/dist/style.css" but logical it have to write: import "vue-simple-calendar/dist/style.css"


To write it like expected, an additional `exports` to package.json is necessary.
"./dist/style.css": {
    "import": "./dist/style.css",
    "require": "./dist/style.css"
}
richardtallent commented 2 years ago

Thanks, this has been addressed in 6.1.0 and 6.2.0, released today.

Leubeling commented 2 years ago

Hello richardtallent, unfortunately it has not been solved in 6.1.0. There is a elegant solution by carpet-berlin in #215. Please try this patch:

--- node_modules/vue-simple-calendar/package.json   2022-10-17 08:42:14.210768278 +0200
+++ node_modules/vue-simple-calendar/package.json   2022-10-17 08:42:58.146767735 +0200
@@ -23,10 +23,7 @@
            "import": "./dist/vue-simple-calendar.mjs",
            "require": "./dist/vue-simple-calendar.umd.js"
        },
-       "./dist/index.css": {
-           "import": "./dist/index.css",
-           "require": "./dist/index.css"
-       }
+       "./dist/style.css": "./dist/style.css"
    },
    "scripts": {
        "dev": "vite",
richardtallent commented 2 years ago

Ah! I missed that the filename was wrong. Fixed now in 6.2.1.