TaTo30 / vue-pdf

PDF component for Vue 3
https://tato30.github.io/vue-pdf/
MIT License
424 stars 62 forks source link

Style.css not exported for Text Layer Implementation #101

Closed adi-dora closed 6 months ago

adi-dora commented 6 months ago

I'm running the VuePDF module and when I try importing the style.css like the documentation, I get an error:

image

Here's my code:

<script lang="ts" setup>
import { useQuasar } from 'quasar';
import { VuePDF, usePDF } from '@tato30/vue-pdf';
import '@tato30/vue-pdf/style.css';
import { ref, onBeforeMount, watch, reactive } from 'vue';
import VCodeBlock from '@wdns/vue-code-block';
import VueCookies from 'vue-cookies';

Any advice would be helpful, thanks!

TaTo30 commented 6 months ago

It could be an issue from vite, the package.json exports are defined like this:

"exports": {
    ".": {
      "require": "./dist/index.umd.js",
      "import": "./dist/index.mjs",
      "types": "./dist/types/index.d.ts"
    },
    "./*.css": "./dist/*.css",
    "./src/*": "./src/*"
  }

Try modifying this line "./*.css": "./dist/*.css" by "./style.css": "./dist/style.css"

adi-dora commented 6 months ago

OK yes, that does fix it for me locally, thank you! But, when I actually deploy, the same error persists because the version of the module that gets installed still has the issue. Do you have any fix for this?