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

UglifyJS build Error #7

Closed
dderevjanik opened this issue Jan 24, 2018 · 1 comment · Fixed by #8
Closed

UglifyJS build Error #7

dderevjanik opened this issue Jan 24, 2018 · 1 comment · Fixed by #8

Comments

@dderevjanik
Copy link
Contributor

Hi,
I'm getting this error when trying to build an app:

C:\PATH_TO_PROJECT\webpack\build.js:35
                        throw new _gulpUtil2.default.PluginError('webpack', buildError);
                        ^
Error: app-3333a2162c4f3c125228.js from UglifyJs
Unexpected token: operator (>) [C:/PATH_TO_PROJECT/node_modules/io-ts-reporters/target/src/index.js:5,0][app-3333a2162c4f3c125228.js:273839,28]

I'm using node 8.X.Y , babel 6.23.0 and building using gulp, which is calling a webpack. In dev mode there is no error and working as it supposed to.

Not sure, what causing this error, but setting "target": "es5" in tsconfig.json can fix this error.

@OliverJAsh
Copy link
Collaborator

It looks like UglifyJs is trying to minify this node module, and this node module is distributed as ES6/ES2015.

We can fix this by distributing an ES5 build instead, which will enable UglifyJs to minify it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants