Posted 14 September 2017, 11:50 am EST
I’m somewhat close I think. So to start I added to my package.json dependencies
"jszip": "3.1.3"
Then in my webpack.vendor.js under entry:
'jszip'
and under resolve I added an alias:
alias: {
jszip: 'jszip/dist/jszip.min.js'
}
And finally under module I added a noParse:
noParse: [/jszip.min.js$/]
This results in jszip getting added to my vendor.dll.js and I verified this by looking in the vendor.json file and found a jszip entry.
Then in my component that has the exportExcelAsync() method I have
import * as JSZip from 'jszip';
This doesn’t work for me though because I’m still getting this error which goes away if I add the script tag to my global index.html
WjGridTestComponent.html:1 ERROR TypeError: h is not a constructor
at Function.n._saveWorkbookToZip (wijmo.xlsx.js:13)
at Function.n.saveAsync (wijmo.xlsx.js:13)
at n.saveAsync (wijmo.xlsx.js:13)
at Function.n.saveAsync (wijmo.grid.xlsx.js:13)