Closed TeddyPerkins closed 4 years ago
User kapilpipaliya solved it,
import { onMount } from 'svelte'
let printJS
onMount(async ()=>{
const p = await import('print-js')
printJS = p.default
console.log(printJS)
})
Anyone can look at repos commit to know more, I am closing the issue....
SapperJs gives 'window is not defined' error with Print.js; It also gives 'use of eval is strongly discouraged' but as long as it works I dont mind; Here is the github repo: Sapperprint
This is a boilerplate sapper with print-js installed; I have previously tried in simple html + js in codepen and VSCode and the worked; I installed print-js via npm install;
If anyone could just send the corrected CODE, it would be highly appreciated!