Code Monkey home page Code Monkey logo

Comments (10)

baptistedonaux avatar baptistedonaux commented on July 18, 2024

Sorry, the log given is :

14 Aug 12:05:12 - error: JS minification failed on dist/dest.js: Unexpected token: name (Params) (line: 123, col: 10, pos: 3308)

Error
    at new JS_Parse_Error (/data/node_modules/uglify-js-brunch/node_modules/uglify-js/lib/parse.js:196:18)
    at js_error (/data/node_modules/uglify-js-brunch/node_modules/uglify-js/lib/parse.js:204:11)
    at croak (/data/node_modules/uglify-js-brunch/node_modules/uglify-js/lib/parse.js:684:41)
    at token_error (/data/node_modules/uglify-js-brunch/node_modules/uglify-js/lib/parse.js:688:9)
    at unexpected (/data/node_modules/uglify-js-brunch/node_modules/uglify-js/lib/parse.js:694:9)
    at semicolon (/data/node_modules/uglify-js-brunch/node_modules/uglify-js/lib/parse.js:714:43)
    at simple_statement (/data/node_modules/uglify-js-brunch/node_modules/uglify-js/lib/parse.js:894:73)
    at /data/node_modules/uglify-js-brunch/node_modules/uglify-js/lib/parse.js:767:19
    at /data/node_modules/uglify-js-brunch/node_modules/uglify-js/lib/parse.js:727:24
    at block_ (/data/node_modules/uglify-js-brunch/node_modules/uglify-js/lib/parse.js:1007:20)

… and other warning logs display by brunch-typescript

from terser-brunch.

paulmillr avatar paulmillr commented on July 18, 2024

We can't really help here unless we see the result source code i'm afraid.

Try looking into your non-minified (disable it) dest.js — maybe there's something wrong with it

from terser-brunch.

baptistedonaux avatar baptistedonaux commented on July 18, 2024

Yes of course !

I try build my project https://github.com/autocompletejs/autocomplete.js/tree/2.0. I have versionned the brunch-config.js.

The fail appears when I execute brunch b -P.

from terser-brunch.

baptistedonaux avatar baptistedonaux commented on July 18, 2024

Up ! Do you have a little time to show my autocomplete build :-/

Thank you for less time devoted at my problem.

from terser-brunch.

kripod avatar kripod commented on July 18, 2024

I am experiencing the same issue when trying to minify TypeScript files.

By the way, minification works well when I paste the compiled TypeScript code to http://lisperator.net/uglifyjs

from terser-brunch.

baptistedonaux avatar baptistedonaux commented on July 18, 2024

@kripod Do you have a solution ? I have re-search a solution in brunch-typescript (I searched a possible workflow error) but unfortunately no…

It's really damage, brunch it's a great solution to build simple project but this little is disappointing… :-/

from terser-brunch.

es128 avatar es128 commented on July 18, 2024

@baptistedonaux how does your plugin work? Just took a very quick look at https://github.com/baptistedonaux/brunch-typescript/blob/master/index.js, and it doesn't seem like you're passing the compiled result back to brunch in the compile method. Seems like you're just passing the source data back and somehow bypassing the brunch compilation pipeline to get your typescript compiled, which would easily explain why uglify chokes on it.

from terser-brunch.

es128 avatar es128 commented on July 18, 2024

This issue really belongs in your plugin's issue tracker, as it doesn't function the way a brunch compiler plugin is supposed to. Or just shift attention over to the typescript plugin that already existed and does seem to follow the regular plugin conventions https://github.com/joshheyse/typescript-brunch, although it seems it could use some updating.

from terser-brunch.

kripod avatar kripod commented on July 18, 2024

@baptistedonaux I have no solution, and also suspended my projects written in TypeScript, sorry.

from terser-brunch.

baptistedonaux avatar baptistedonaux commented on July 18, 2024

@kripod The last release of [email protected] (dev by @colinbate ) supports production flag.

from terser-brunch.

Related Issues (19)

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.