-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@progress/kendo-angular-excel-export and specially @progress/kendo-ooxml breaks my build #489
Comments
What project template are you using? I've tried this with Angular CLI and AoT seems to work. See the test project in this repo. |
We are using Rollup for AoT, not webpack. Could be a problem, how rollup is handling those node modules. But like i said, problem seems to be that jszip is using internal nodes modules. And I have to be sure that you have configured jszip with those options mentioned in the jszip issue. I'm not sure if I can change that in our build config. |
I've managed to get this working by aliasing JSZip in the Rollup configuration: const alias = require('rollup-plugin-alias');
const path = require('path');
const process = require('process');
const config = {
...
plugins: [
alias({
jszip: path.join(process.cwd(), './node_modules/jszip/dist/jszip.min.js')
})
]
} Will investigate if there's something else we can do. |
Thank you, I will try it with our build too. |
I've set-up a project with Angular Seed to test this. Tested by running the application with |
Yes, our app is running again, thank you. but didn't test the Excel export. And why did the aliasing help? That I don't get :) |
The main entry in the JSZip package points to its Node.js version. What we need is to take the browser-friendly version from dist. This is solved with the alias. |
i tried the aliasing step but not working |
We fixed this in the latest release of the kendo-ooxml package. Note that the alias must be removed. See telerik/kendo-angular-quickstart-seed@c3c59db and telerik/kendo-angular-quickstart-seed@70ec11d |
still aot build gives this error anything missing? |
I've tested this in the test-489 branch of our Angular CLI sample. Can you please compare with your project? |
i have no errors, it works for me |
Closing this, but feel free to reopen if more details become available. |
what is the purpose to this change? i'm using browserify with ts plugin to generate my bundle file so this still breaks the build for not founding the JSZip files so why not leave packages Json in charge of the entry point please let me know if you need any more info to reproduce the error |
Are you using any specific project template? We only test against Webpack 1/2, Rollup and SystemJS based project at the moment. |
I'm not using any of your templates i was able to do a workaround with this line of code for who is using browserify to do the bundle
and this can be done also at karma with karma-browserify
|
@plcart you might need the same mapping for the Pako library (used for PDF compression) in the latest version of the Grid: bundle.require(nodeResolve.sync('pako'), { expose: 'pako/dist/pako_deflate' }); |
By using jszip, this breaks our AOT build. jszip has dependencies to nodejs modules, like buffer and streams.
In jszip there was an issue for webpack support. Stuk/jszip#333.
I don't know how your build process is working, but could you make sure this configuration is applied?
Thank you
The text was updated successfully, but these errors were encountered: