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

Error importing VTooltip during production webpack build with UglifyJS #239

Closed
nlitwin opened this issue Apr 12, 2019 · 7 comments · May be fixed by ajesse11x/cms#3
Closed

Error importing VTooltip during production webpack build with UglifyJS #239

nlitwin opened this issue Apr 12, 2019 · 7 comments · May be fixed by ajesse11x/cms#3
Labels

Comments

@nlitwin
Copy link

nlitwin commented Apr 12, 2019

I recently ran into an error that seems like it's coming from this library. When running my production webpack build, I get the following error:

ERROR in vendors-c487e72a0905278b058b.min.js from UglifyJs
Unexpected token: keyword «const» [vendors-c487e72a0905278b058b.min.js:134515,0]

When I investigated this error and line, it led me to the code imported from dist/v-tooltip.umd.js

// dist/v-tooltip.umd.js

// ... other code

const __vue_script__ = script;

// ... other code

/* style */
const __vue_inject_styles__ = undefined;
/* scoped */
const __vue_scope_id__ = undefined;
/* module identifier */
const __vue_module_identifier__ = undefined;
/* functional template */
const __vue_is_functional_template__ = false;

In my Vue code, I'm simply importing the library with these lines:

import VTooltip from "v-tooltip"
Vue.use(VTooltip)

It looks like these consts were added only a day ago in 19cd67b to dist/v-tooltip.umd.js

Since it's common practice to ignore transpiling code imported from node_modules (because they should be transpiled already), I think these consts need to be removed from the dist/v-tooltip.umd.js file.

Let me know if you have any questions or if I can provide any more information.
Thanks!

@scniro
Copy link

scniro commented Apr 18, 2019

this broke my app entirely...

@scniro
Copy link

scniro commented Apr 18, 2019

reverting back to "v-tooltip": "2.0.0-rc.33" fixed it

@bissolli
Copy link

Same issue here.

@overallduka
Copy link

overallduka commented Feb 12, 2020

I'm having yet this same issue with v2.0.3.

ERROR in static/js/vendor.26d9c44211f8d14845e3.js from UglifyJs
Unexpected token: name (hook) [./~/v-tooltip/dist/v-tooltip.esm.js:4078,0][static/js/vendor.26d9c44211f8d14845e3.js:24955,8]

Reverted back to 2.0.0-rc.33 by now.

@quannt
Copy link

quannt commented Apr 18, 2020

Still happening to me on v2.0.3.

@ElliotPsyIT
Copy link

Exact same error as @overallduka on v2.0.3

@jandobrowolski
Copy link

@overallduka set dependency in package.json to "2.0.0-rc.33", NOT "^2.0.0-rc.33" or "~2.0.0-rc.33". There is a "let" command on 2.0.3 version, which makes it ES6, hence the error. You can use anything up to 2.0.2.

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

Successfully merging a pull request may close this issue.

8 participants