testdouble / theredoc

Makes your multi-line JavaScript strings look good
80 stars 3 forks source link

ES6 syntax #2

Open felipemsantana opened 6 years ago

felipemsantana commented 6 years ago

The usage of ES6 syntax in this lib is breaking in UglifyJS when bundling in webpack

ERROR in app-7d11380495e59eb43349.js from UglifyJs
SyntaxError: Name expected [app-7d11380495e59eb43349.js:132037,46]

And would fail to be parsed in old browsers

searls commented 6 years ago

What's the issue? I'd welcome a PR to fix this issue.

For what it's worth, this library is meant to support Node 6 & up and current versions of the evergreen browsers.

felipemsantana commented 6 years ago

It is not possible use this lib in webpack < 4 https://stackoverflow.com/questions/45870467/error-in-bundle-js-from-uglifyjs-name-expected