BILAL SURAWALA
BILAL SURAWALA

Reputation: 81

vue-html-to-paper styles not loading

I am using vue-html-to-paper to print in my vuejs app and followed the doc, but styles is not loading into print window, when click on print getting console log as in pic

const options = {
  name: "_blank",
  specs: ["fullscreen=yes", "titlebar=yes", "scrollbars=yes"],
  styles: ["./assets/css/demo.css"],
};
Vue.use(VueHtmlToPaper, options);

enter image description here

Upvotes: 1

Views: 1460

Answers (1)

voidarelli
voidarelli

Reputation: 11

I assume you're using Webpack in your project. If so, you'll need to place the assets directory in your /public directory (not in /src). Webpack ignores everything in that directory and so they are served as usual. More info

Short answer: Put your /assets folder in /public and the styles should load.

Upvotes: 1

Related Questions