Comments (10)
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.
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.
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.
Up ! Do you have a little time to show my autocomplete build :-/
Thank you for less time devoted at my problem.
from terser-brunch.
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.
@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.
@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.
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.
@baptistedonaux I have no solution, and also suspended my projects written in TypeScript, sorry.
from terser-brunch.
@kripod The last release of [email protected] (dev by @colinbate ) supports production flag.
from terser-brunch.
Related Issues (19)
- Wrong minified output with a jade template HOT 9
- Need config options with angular HOT 3
- JS minify failed on public/javascripts/app.js: TypeError: Cannot assign to read only property 'except' of [object Object] HOT 20
- Uglify breaks RickShaw HOT 10
- Weird errors when using 'brunch watch' HOT 30
- npm prepublish did not run HOT 1
- TypeError in NPM when using Brunch on Heroku from UglifyMinifier.optimize HOT 43
- Error when using source maps HOT 2
- Copyright notice is always stripped HOT 3
- Fatal error when setting uglify.ignored HOT 2
- Plugin not processing HOT 3
- Uglify js/json without concatenation (files/javascripts/joinTo) HOT 4
- rename minjs HOT 7
- Brunch 2.0 support HOT 1
- Arrow functions / ES6 error ? HOT 2
- Supporting uglify-es? HOT 4
- Can't generate a production build HOT 4
- Optimizing of ../priv/static/js/app.js failed. L12175:31 SyntaxError: Unexpected token: operator (>) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terser-brunch.