On 10/06/19 20:03, Paolo Greppi wrote:
Tomorrow I'll test the generated file inside laminar. If that works this is an
The last bit is to move this config change to debian/rollup-umd.js so that it
does not impact all builds..
I tested with the non-minified file generated using the patched build/config.js
and this command:
NODE_PATH=debian/node_modules/ rollup -m -c debian/rollup-umd.js
but when opening the laminar dashboard I get a new error:
vue-router.min.js:1195 Uncaught TypeError: Cannot read property 'forEach' of
at compileRouteRegex (vue-router.min.js:1195)
at addRouteRecord (vue-router.min.js:1112)
at Array.forEach (<anonymous>)
at createRouteMap (vue-router.min.js:1060)
at createMatcher (vue-router.min.js:1274)
at new VueRouter (vue-router.min.js:2374)
Not sure if this is due to some path-to-regexp API change.
Anyway that code is skipped for the minified version:
so I tested the file generated with:
NODE_PATH=debian/node_modules/ rollup -m -c debian/rollup-umd-min.js
(see attached screenshot)
So I confirm that the way to go to fix the issue with libjs-vue-router minified
UMD build is to enable rollup-plugin-node-resolve.
The proposed config change should be moved from build/config.js to
debian/rollup-umd*.js so that it does not impact the other builds.
But the dev mode, minified UMD build would be affected by the exception above,
generated in compileRouteRegex function.