Coder Social home page Coder Social logo

UglifyJs error about jsonexport HOT 8 CLOSED

kaue avatar kaue commented on September 6, 2024
UglifyJs error

from jsonexport.

Comments (8)

AckerApple avatar AckerApple commented on September 6, 2024 1

Please read the documentation on using jsonexport in the browser and you'll be fine:

https://www.npmjs.com/package/jsonexport#browser

from jsonexport.

AckerApple avatar AckerApple commented on September 6, 2024

My best guess is webpack is having a tough time with this code: https://github.com/kauegimenes/jsonexport/blob/master/lib/core/escape-delimiters.js#L26

I think webpack is having an issue with a multlined ternary statement

I will not be performing additional testing or research on this issue. That is my guess. Try editing that file in your local copy and turn the ? statement into an IF ELSE, if it works then we can talk more.

from jsonexport.

xorbis avatar xorbis commented on September 6, 2024

The error was on line 13
https://github.com/kauegimenes/jsonexport/blob/master/lib/core/escape-delimiters.js#L13
A let statement...

Changing it to var works but fails on the next let statement.
I am hoping top use jsonexport in the browser for a VueJS streamed client request to convert JSON to CSV. Works fine in non-uglified mode.

This leave me wondering if babel parses the module to convert it to ES5 since UglifyJs only supports ES5.
Anyhow it's probably not a jsonexport issue but all other modules import and uglify fine.

from jsonexport.

AckerApple avatar AckerApple commented on September 6, 2024

Ohhhh shit, you are trying to webpack..... duh... one second

from jsonexport.

AckerApple avatar AckerApple commented on September 6, 2024

Please close issue when satisified

from jsonexport.

xorbis avatar xorbis commented on September 6, 2024

import jsonexport from "jsonexport/dist";
Thank you sooo much!
Cheers from Quebec/Canada!

from jsonexport.

AckerApple avatar AckerApple commented on September 6, 2024

Hey Quebec/Canada, you're using TypeScript? Hell yeah, Angular5? I swear I've seen your face on other issue reports.

Besides the point, an Angular5 project needed in-browser exporting which brought me to jsonexport last year which was NOT webpack compatible until I added it and became a contributor of this package.

I do love this package a lot. It has made my exporting life, in browser especially, a world of easier than in the past.

Farewell good fella

from jsonexport.

xorbis avatar xorbis commented on September 6, 2024

Our stack is... https://stackshare.io/leadfox/leadfox
I fell in love with VueJs's simple setup and lightness.

We use jsonexport to Promise.each() multiple Rest API requests over millions of contacts for CSV exports.
With jsonexport we can let the web client work instead of preparing the CSV server-side.

Thanks again.

from jsonexport.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.