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

issue with prod build #6

Closed
shikharani16 opened this issue Sep 29, 2020 · 7 comments
Closed

issue with prod build #6

shikharani16 opened this issue Sep 29, 2020 · 7 comments
Labels
question Further information is requested

Comments

@shikharani16
Copy link

ERROR in vueBundle.js from UglifyJs
Unexpected token: keyword «const» [vueBundle.js:14019,6022]

I am getting this error. I am using Webpack : 4 .I know this component is using ES6 and UglifyJS does not support ES6.
Do you some suggestion what should I do to resolve it.

@hunterliu1003
Copy link
Member

Hi @shikharani16,

I found this:

https://github.com/terser/terser#why-choose-terser:

Why choose terser?
uglify-es is no longer maintained and uglify-js does not support ES6+.

terser is a fork of uglify-es that mostly retains API and CLI compatibility with uglify-es and uglify-js@3.

Maybe you can replace UglifyJs with terser-webpack-plugin:

https://www.npmjs.com/package/terser-webpack-plugin

@shikharani16
Copy link
Author

Hi,, yes I tried It yesterday and it was working fine. Thanks

@hunterliu1003
Copy link
Member

hunterliu1003 commented Sep 30, 2020

Hi, @shikharani16

Thanks for your reply.
Let me found the library build was not fully compiled to es5,
so I just publish version v0.13.5 to fixed this.

If you want to know, here is the commit d355657

@shikharani16
Copy link
Author

sure will check and let you know. Thank you

@shikharani16
Copy link
Author

shikharani16 commented Oct 8, 2020

Hi, I have updated to release v0.13.5 and now look like new problem is coming after that.
I am stuck in show/hide. I am using v-model property to do show/hide from outside and inside the component. But many times it is opening two Modal windows. This is my declaration

The showModal I am doing toggle using event bus. Looks like something is not right as it opens two windows many times. I saw this in new documentation this.$vfm.show('example'). I want to use these api functions as i think it should resolve my problem. but I am not sure how i can do that. Is there any specific release needed for this this.$vfm.show/this.$vfm.hide as i am not able to use it with 0.13.5.??

@shikharani16 shikharani16 reopened this Oct 8, 2020
@hunterliu1003
Copy link
Member

hunterliu1003 commented Oct 8, 2020

Hi,

You should upgrade version to 0.15.0 for the new API.

here is the example:
https://codepen.io/hunterliu1003/pen/dyXyBpR

@hunterliu1003 hunterliu1003 added the question Further information is requested label Oct 13, 2020
@shikharani16
Copy link
Author

I tried using 0.15.0 but looks like that created many issues with CSS so I switched back to 0.13.5.

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

No branches or pull requests

2 participants