[Pkg-javascript-devel] Bug#959798: Bug#959798: libjs-webrtc-adapter ftbfs with node-grunt-babel 8.0 (using babel 7.4) in experimental
Pirate Praveen
praveen at onenetbeyond.org
Fri May 15 04:35:33 BST 2020
On Thu, May 14, 2020 at 5:30 pm, Jonas Smedegaard <jonas at jones.dk>
wrote:
> No, fails.
>
> The package now checks unit tests during build, and switching to
> Babel 7
> causes one of those to fail:
>
> not ok 69 Log suppression "before each" hook for "does not call
> console.log by default"
> Cannot find module ./utils
I think it is a bug in node-browserify-lite (that is cannot handle code
generated by babel 7). I can see utils.js is present in dist but it did
not get bundled correctly. I could get the tests to pass when using
webpack instead of browserify-lite.
With debian/webpack.config.js,
'use strict';
var path = require('path');
var config = {
target: 'node',
resolve: {
modules: ['/usr/share/nodejs', '/usr/lib/nodejs'],
},
resolveLoader: {
modules: ['/usr/share/nodejs'],
},
output: {
libraryTarget: 'umd'
},
module: { rules: [ { use: [ 'babel-loader' ] } ] }
}
module.exports = config;
and calling webpack --config debian/webpack.config.js -n adapter -f umd
dist/adapter_core5.js -o out/adapter.js
has passing tests. I have pushed my rough changes in babel7 branch. I
don't use babel-loader here (just copied an old configuration), may be
you can use babel-loader and pass src/js directly to webpack instead of
babeljs.
More information about the Pkg-javascript-devel
mailing list