Skip to content
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

Use the excel-export package in the slickgrid-vanilla-bundle version? #409

Closed
mcallegario opened this issue Jul 13, 2021 · 6 comments
Closed
Labels
question Further information is requested

Comments

@mcallegario
Copy link
Contributor

Hi!
Sorry for my lack of knowledge, but how do I use the excel-export package in the slickgrid-vanilla-bundle version?

From now on, I thank you for the excellent work.

@ghiscoding
Copy link
Owner

It's in the package README and in the Wiki and in an Example, that should be enough to look into

@ghiscoding
Copy link
Owner

closing since I believe the question was answered

@mcallegario
Copy link
Contributor Author

dear Ghislain,

Thank you very much for your attention, I use slickgrid-universal on Sharepoint so I make reference to "slickgrid-vanilla-bundle.js", this is my difficulty, as I don't have much knowledge to transform the excel-Export package to the " vanilla-bundle"... within my limitations I tried to generate the bundle, but I wasn't successful I always stop at the error:

image

Please would it be possible for you to help me once again with tips? How to generate the package correctly or helping me with the error.

Graciously,
Marcos Callegario

@ghiscoding
Copy link
Owner

ghiscoding commented Jul 16, 2021

That's a WebPack 5 error and if you read carefully it says that "stream" (and possibly more packages like node "core" and other packages) used to have polyfill included in WebPack 4 but that got removed in WebPack 5 and that caused a lot of user problems and a lot of them complaining about it. If you search over the net, you can find this SO How to Polyfill node core modules in webpack 5 or this GitHub issue

in my case, I just disable the warning and won't have the polyfill (so it won't work on old browser like IE but I don't care), just add a fallback section in your webpack.config.js, here's mine

resolve: {
extensions: ['.ts', '.js'],
modules: [srcDir, 'node_modules'],
mainFields: ['browser', 'module', 'main'],
fallback: {
http: false,
https: false,
stream: false,
util: false,
zlib: false,
}
},

If you really want to add the polyfill to still support the old browser, I think you can add this to your tsconfig.json

{
  ...
  "compilerOptions": {
    "paths": {
      "stream": [ "./node_modules/stream-browserify" ]
    },
}

So anyway, this is a WebPack issue, it's not related to the library.

@mcallegario
Copy link
Contributor Author

Great... worked perfectly....
Thank you so much!!!
Once again, congratulations for the excellent work.

@ghiscoding
Copy link
Owner

another happy user, you can also upvote if you like the lib 😉 ⭐

@ghiscoding ghiscoding added the question Further information is requested label Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants