Code Monkey home page Code Monkey logo

Comments (4)

TaTo30 avatar TaTo30 commented on May 30, 2024

The implementation of layers has changed a bit since v1.6, now you need to import css styles for layers work properly.

import '@tato30/vue-pdf/style.css'

from vue-pdf.

JoseCadenas avatar JoseCadenas commented on May 30, 2024

Hey Aldo,

Thanks for the help, I didn't notice that change. However, with that import I still encounter an issue.

import "@tato30/vue-pdf/style.css";

Results in this error Module not found: Error: Package path ./style.css is not exported from package /Users/jose/Documents/GitHub/ERP/node_modules/@tato30/vue-pdf (see exports field in /Users/jose/Documents/GitHub/ERP/node_modules/@tato30/vue-pdf/package.json)

I modified @tato30/vue-pdf package.json exports object based on the error log above and it works:

  "exports": {
    ".": {
      "require": "./dist/index.umd.js",
      "import": "./dist/index.mjs",
      "types": "./dist/types/index.d.ts"
    },
    "./*.css": "./dist/*.css",                     <---- I added this line
    "./**/*.css": "./dist/*.css",
    "./src/*": "./src/*"
  },

Let me know if I should provide more information or what I can do to make text layers work without package.json modification. Again I appreciate the help!

Jose

from vue-pdf.

TaTo30 avatar TaTo30 commented on May 30, 2024

Fixed.

I was misunderstanding on how npm handles the path wildcards, thanks for catch the error.

from vue-pdf.

JoseCadenas avatar JoseCadenas commented on May 30, 2024

Updated and works as expected

Im glad I could help. Thank you for VuePDF!

from vue-pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.