2.2.4
Reproduction linkjoma74/vuejs-one-starter@ddae1b7
Steps to reproducenpm run build
npm run dist-test
GUI is coming up
What is actually happening?GUI is not coming up, console displays
TypeError: t.formatZeroPadded is not a function(…)
On "npm run build" webpack and it's UglifyPlugin mangles the js files. "npm run dist-test" opens a browser and should display some GUI - but can not by cause of given "TypeError: t.formatZeroPadded is not a function".
The mentioned formatZeroPadded function is a method of a self-written Mixin. formatZeroPadded is used in my App.vue template interpolation <span ... >{{ formatZeroPadded(this.projectsLength) }}.
My conclusion of the cause of this error is that the template interpolation "does not take part" in the mangleing of the js files. Next i will show the js output of the mis-mangled version. The function definition get's mangled to var r=function(t) while the template interpolation still is un-mangled t.i. still formatZeroPadded. See section the formatZeroPadded function call.
Proof 1 - if i keep_fnames in webpack.optimize.UglifyJsPlugin t.i. formatZeroPadded is not mangled and keeps defined as function formatZeroPadded, everything runs fine.
Proof 2 - if i substitute formatZeroPadded with var r in the mis-mangled js file, everything runs fine.
MIS-MANGLED VERSION
the formatZeroPadded function definition
function(t,e,n){"use strict";/* harmony export (binding) /
n.d(e,"a",function(){return r});/*
the formatZeroPadded function call
//
function(t,e,n){var r=n(29)(/ script /
n(52),/ template /
n(79),/ scopeId /
null,/ cssModules /
null);t.exports=r.exports},/ 79 /
//
function(t,e){t.exports={
...
staticStyle:{"vertical-align":"super"}},[t._v(t._s(t.formatZeroPadded(this.projectsLength)))])])])]),t._v(" "),n
...
/***/
function(t,e,n){n(31),t.exports=n(32)}],[81]);
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4