On തിങ്കള് 05 മാർച്ച് 2018 03:25 രാവിലെ, Ben Finney wrote: > My understanding, from <URL:https://webpack.js.org/concepts/modules/> > the Webpack documentation about modules, is that it claims to support > the ‘require’ modules (so-called “AMD modules”). > > The ‘libjs-backbone’ package installs Backbone code that uses AMD-style > ‘require’ dependencies.
I think you meant UMD (Universal Module) here. I think it is still better to require/import just 'backbone' and let nodejs and webpack handle the path resolution. > So, when I write code that uses ‘import’ to bring in Backbone, and the > Backbone code uses ‘require’ for its dependencies, that seems compatible > with Webpack if I understand the Webpack documentation. Or am I missing > something there? > In this case, you just need to tell webpack to resolve dependencies from /usr/lib/nodejs. See https://wiki.debian.org/Javascript/Nodejs#CA-55601b3ea46d08ca4081f3465bbf840faab73781_10
signature.asc
Description: OpenPGP digital signature
-- Pkg-javascript-devel mailing list Pkg-javascript-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel