[Pkg-javascript-devel] Problems to recreate minimized JS in r-cran-jsonld

Pirate Praveen praveen at onenetbeyond.org
Thu May 10 09:31:56 BST 2018



On Wed, May 9, 2018 at 3:05 PM, Andreas Tille <andreas at fam-tille.de> 
wrote:
> Hi,
> 
> I was stumbling upon an issue with some minimized JS in the package
> r-cran-jsonld (ITPed in #898224).  I tried to recreate jsonld.min.js 
> and
> have written a script[1] which calls webpack in a clone of the Github
> reporsitory.  Unfortunately the webpack call ends in:
> 
> 
> 
> webpack-merge at 4.1.2 node_modules/webpack-merge
> └── lodash at 4.17.10
> Hash: eaf5c95c94821ab4944c9f696b4a89040915c26b
> Version: webpack 3.5.6
> Child
>     Hash: eaf5c95c94821ab4944c
>     Time: 140ms
>         Asset     Size  Chunks             Chunk Names
>     jsonld.js  3.61 kB       0  [emitted]  jsonld
>        [0] multi regenerator-runtime/runtime 
> core-js/fn/array/includes core-js/fn/object/assign core-js/fn/promise 
> core-js/fn/string/starts-with core-js/fn/symbol ./lib/index.js 100 
> bytes {0} [built]
> 
>     ERROR in multi regenerator-runtime/runtime 
> core-js/fn/array/includes core-js/fn/object/assign core-js/fn/promise 
> core-js/fn/string/starts-with core-js/fn/symbol ./lib/index.js
>     Module not found: Error: Can't resolve 'babel-loader' in 
> '/home/andreas/debian-maintain/salsa/r-pkg-team/0_prospective/r-cran-jsonld/debian/JS/jsonld.js'
>      @ multi regenerator-runtime/runtime core-js/fn/array/includes 
> core-js/fn/object/assign core-js/fn/promise 
> core-js/fn/string/starts-with core-js/fn/symbol ./lib/index.js
> 
> 

You'll need to update webpack.config.js with system path for it to find 
apt installed modules.

> jsonld.js does not work.  The file size of this uncompressed file is 
> way
> smaller than the minimazion result and doese not work together with 
> the
> R code.  Thus I really need to undergo the process to create the
> minimized JS.
> 
> Any idea how to approach this?

https://wiki.debian.org/Javascript/#Using_build_tools_like_grunt has 
examples.

> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20180510/8cc9c90c/attachment.html>


More information about the Pkg-javascript-devel mailing list