[Pkg-javascript-devel] Bug#977304: autosize.js: include add-module-exports plugin equivalent in .babelrc
Pirate Praveen
praveen at onenetbeyond.org
Sun Dec 13 19:46:27 GMT 2020
Package: autosize.js
Version: 4.0.2~dfsg1-4
Severity: important
I get this error is javascript console when running gitlab,
TypeError: a() is not a function. (In 'a()(this.textarea)', 'a()' is an
instance of Object)
It seems to be generated by this code,
document.addEventListener("DOMContentLoaded", function() {
Object(s.a)(function() {
const t = document.querySelectorAll(".js-autosize");
a()(t),
a.a.update(t),
t.forEach(function(t) {
return t.classList.add("js-autosize-initialized")
})
})
});
I suspect this is caused by autosize.js build issues
https://salsa.debian.org/js-team/autosize.js/-/blob/master/debian/patches/add-babelrc.patch
tries to replace some babel 6 modules with babel 7 equivalents.
But is it not include add-module-exports plugin
https://salsa.debian.org/js-team/autosize.js/-/blob/master/build.js#L51
I think we should add this plugin also to babelrc and add
node-babel-plugin-add-module-exports as build dependency.
More information about the Pkg-javascript-devel
mailing list