Object-Assign-Deep icon indicating copy to clipboard operation
Object-Assign-Deep copied to clipboard

Please run Babel or similar for dist

Open hmedney opened this issue 8 years ago • 14 comments

First, thanks for this useful library 😃. Minor suggestion - please consider running the source through Babel or similar before publishing such that the distributable code is all ES5. This will eliminate js compatibility issues when bundling and minifying this package (ran into an issue recently with backticks in this package). Thanks!

hmedney avatar Jun 26 '17 20:06 hmedney

Yeah those backticks wasted a couple of hours of my life.

edit - this library also probably saved me a bunch of time too, so it's a wash. Thanks for your contributions.

rob-mcgrail avatar Jul 07 '17 03:07 rob-mcgrail

OK I'll setup Babel when I get time. I didn't anticipate people would want to use this on frontend, my bad!

saikojosh avatar Jul 07 '17 10:07 saikojosh

I just spent an hour of my life trying to track down an IE11 error: SCRIPT1014: Invalid character

Was related to the backticks in this library

mattotodd avatar Sep 13 '17 18:09 mattotodd

Yep just hit this issue myself when running production code through Uglify: Unexpected character '`'

PabloDiablo avatar Oct 11 '17 15:10 PabloDiablo

@saikojosh any update on this? I saw a PR opened on July, can we have it merged and released?

gReis89 avatar Nov 26 '17 14:11 gReis89

I've converted the module to single quotes now so should work fine. When I have more time I will look at the Babel PR.

saikojosh avatar Apr 04 '18 15:04 saikojosh

default

Same problem, my project created with create-react-app got err, any idea to solve this problem?

thelastfantasy avatar Apr 14 '18 15:04 thelastfantasy

Which version of this module are you using? I removed backticks from the latest version.

Regards, -Josh Cole. Sent from my iPhone.

On 14 Apr 2018, at 16:55, thelastfantasy [email protected] wrote:

Same problem, my project created with create-react-app got err, any idea to solve this problem?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

saikojosh avatar Apr 14 '18 17:04 saikojosh

0.4.0, I downloaded it with npm. I ran babel CLI to output an es5 version and it's ok now.

thelastfantasy avatar Apr 15 '18 03:04 thelastfantasy

Chiming in here - integrating object-assign-deep broke our module (swagger-client) for Node 4 users due to use of const in the published module: https://github.com/swagger-api/swagger-js/issues/1315. It breaks in IE11 too, but our Babel sidestepped that problem.

Please consider transpiling 😄

shockey avatar May 07 '18 20:05 shockey

@shockey Node 4 went end-of-life a month ago. I plan to merge in one of the PRs but I don't have time to do a full review right now. It's not a priority seeing as Node 4 is no longer supported.

output

saikojosh avatar May 08 '18 11:05 saikojosh

my project is webpack4+vue create by vue-cli 3.0 I know this package have es6 syntax and babel igonre all files inside node_modules by default so need to add transpileDependencies: ['object-assign-deep'] to vue.config.js but error also happens unfortunately Cannot assign to read only property 'exports' of object '#<Object>'

I have no way😭

mkanako avatar Sep 11 '18 03:09 mkanako

@mkanako my fork may solve your issue, it’s the same aside from the fact that it ships already transpiled through Babel: https://www.npmjs.com/package/@kyleshockey/object-assign-deep

shockey avatar Sep 11 '18 03:09 shockey

@shockey thank you very much!! you solved my problem immediately!!

mkanako avatar Sep 11 '18 03:09 mkanako