This is a migrated thread and some comments may be shown as answers.

kendoui and webpack how to load jszip

2 Answers 429 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Enrico
Top achievements
Rank 1
Enrico asked on 21 Aug 2016, 09:20 AM

Hi,

I've installed kendo (latest buil) using npm with my pro license.

I'm able to make it work using webpack, but I could not do the same with jszip which is required for export.

 

Any suggestion?

Thanks!

2 Answers, 1 is accepted

Sort by
0
Enrico
Top achievements
Rank 1
answered on 21 Aug 2016, 09:53 AM

Sorry for this auto-answer, but I'm still new to webpack and I just came across a possible solution.

Since kendo is referencing JSZip as global, you have to use ProvidePlugin as following:

config.plugins.push(new webpack.ProvidePlugin({
  'JSZip': 'jszip',
  'window.JSZip': 'jszip' // this doesn't expose JSZip property for window, but exposes it to every module
}));

 

If you have a better way please let me know!

 

Thanks

0
Accepted
Petyo
Telerik team
answered on 24 Aug 2016, 05:54 AM
Hello,

that's a good approach, actually. We do the same thing for our commonjs module packaging.

Regards,
Petyo
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
General Discussions
Asked by
Enrico
Top achievements
Rank 1
Answers by
Enrico
Top achievements
Rank 1
Petyo
Telerik team
Share this question
or