Does anyone have an example of webpack working with running GridExcelExporter to export a grid? I'm running into all sorts of webpack'ish issues when trying to do so.
So I'm back to the uncaught Class error. I used the expose-loader because I can't figure out with typescript how to get the global require statements to work. I'm actually using import statements in my TS file like this:
import "blob";
import "intl";
import "filesaver";import "./vendor/infragistics.documents.core";import "./vendor/infragistics.excel";import "./vendor/infragistics.gridexcelexporter";
and the expose:
{ test: require.resolve("intl"), loader: 'expose-loader?Intl' }, { test: require.resolve("filesaver"), loader: 'expose-loader?saveAs' }
Does the 'imports-loader' do the magic?
Sure. Please find attached both package.json and webpack.config.js that were used.
Can you please supply the webpack.config file you used as well as the package.json file? I'm using typescript as well, so I want to make sure I've got everything setup similarily
Hello Stephen,
I investigated further and found out we need to pass this.IntlPollyFill.__addLocaleData to resolve the No Locale Data error (this is done in the Infragistics.documents.core.js). Then a saveAs is not defined error will occur, so we will need to put saveAs on the global scope as well:
global.saveAs = require('./ignite/filesaver').saveAs;
I am attaching the sample I worked with.
Please let me know if you have further questions on the matter, I will be glad to help.
Hi Stephen,
Meanwhile could you update me if you did worked around the "No locale data has been loaded" error and how, and what is the latest issue you are running into.
Hristo