-
Notifications
You must be signed in to change notification settings - Fork 689
Open
Description
HI!
I am using print js and its great!
The only problem I am facing is that the dist/print.js had on line 10 a window declaration which will fail on ssr when trying to load the site with a printjs import.
First 10 lines of dist/print.js
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["printJS"] = factory();
else
root["printJS"] = factory();
})(window, function() {
return /******/ (function(modules) {
According to this site https://zenuml.medium.com/window-is-undefined-in-umd-library-output-for-webpack4-858af1b881df
a fix would be adding globalObject this. I will check further but thought i'd create an issue already!
Metadata
Metadata
Assignees
Labels
No labels