Re: [Pkg-javascript-devel] ES6 ‘import’ of Debian-installed module

2018-03-06 Thread Jonas Smedegaard
Quoting Ben Finney (2018-03-06 22:37:22) > Pirate Praveen writes: > > > On ചൊവ്വ 06 മാർച്ച് 2018 03:45 വൈകു, Ben Finney wrote: > > > Is that a bug in the Debian Webpack, or a bug in the Debian > > > Backbone, or a bug in the Debian jQuery? Or a bug in the Webpack > > >

Re: [Pkg-javascript-devel] ES6 ‘import’ of Debian-installed module

2018-03-06 Thread Ben Finney
Pirate Praveen writes: > On ചൊവ്വ 06 മാർച്ച് 2018 03:45 വൈകു, Ben Finney wrote: > > Is that a bug in the Debian Webpack, or a bug in the Debian > > Backbone, or a bug in the Debian jQuery? Or a bug in the Webpack > > configuration I've shown above? > > Do you have

Re: [Pkg-javascript-devel] ES6 ‘import’ of Debian-installed module

2018-03-06 Thread Pirate Praveen
On ചൊവ്വ 06 മാർച്ച് 2018 03:45 വൈകു, Ben Finney wrote: > > With that configuration, Webpack finds Backbone, but then fails to find > jQuery (as needed by the Debian-installed Backbone package). > > = > $ webpack --config webpack.config.js > Hash: a9597112585b9ca5fb40 > Version: webpack 3.5.6

Re: [Pkg-javascript-devel] ES6 ‘import’ of Debian-installed module

2018-03-06 Thread Ben Finney
Pirate Praveen writes: > On ചൊവ്വ 06 മാർച്ച് 2018 08:29 രാവിലെ, Ben Finney wrote: > > So, either the defaults as installed by Debian are not sufficient > > for Webpack to resolve the path of an installed NodeJS library; or I > > have misunderstood what you say. > > I

Re: [Pkg-javascript-devel] ES6 ‘import’ of Debian-installed module

2018-03-05 Thread Pirate Praveen
On ചൊവ്വ 06 മാർച്ച് 2018 08:29 രാവിലെ, Ben Finney wrote: > I believe this configuration just relies on Webpack and NodeJS to figure > out the path resolution: > > = > $ cat webpack.config.js > "use strict"; > const path = require('path'); > module.exports = { > entry: './source/foo.js', >

Re: [Pkg-javascript-devel] ES6 ‘import’ of Debian-installed module

2018-03-05 Thread Ben Finney
Pirate Praveen writes: > I think it is still better to require/import just 'backbone' Okay: = $ cat ./source/foo.js "use strict"; import 'backbone'; = > and let nodejs and webpack handle the path resolution. I believe this configuration just relies on

Re: [Pkg-javascript-devel] ES6 ‘import’ of Debian-installed module

2018-03-05 Thread Pirate Praveen
On തിങ്കള്‍ 05 മാർച്ച് 2018 03:25 രാവിലെ, Ben Finney wrote: > My understanding, from > the Webpack documentation about modules, is that it claims to support > the ‘require’ modules (so-called “AMD modules”). > > The ‘libjs-backbone’ package installs

Re: [Pkg-javascript-devel] ES6 ‘import’ of Debian-installed module

2018-03-04 Thread Ben Finney
Pirate Praveen writes: > On March 4, 2018 2:56:53 PM GMT+05:30, Ben Finney wrote: > >I have the ‘libjs-backbone’ package installed, and want to use it in > >some JavaScript code via an ES6 ‘import’ statement. > > As far as I understand, you have to

Re: [Pkg-javascript-devel] ES6 ‘import’ of Debian-installed module

2018-03-04 Thread Pirate Praveen
On March 4, 2018 2:56:53 PM GMT+05:30, Ben Finney wrote: >Howdy all, > >How should I write JavaScript ‘import’ statements to import a module >installed by a Debian package? > >Now that ‘webpack’ is available in Unstable, I have installed it (into >a >Buster host, if that