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',
> output: {
> path: path.resolve(__dirname, 'dist'),
> filename: 'app.js',
> },
> };
> =====
>
> Webpack simply fails to find ‘backbone’:
> 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 had linked to an exact line of the sample configuration which you seem
to have missed.
resolve: {
modules: ['/usr/lib/nodejs', '.'],
},
resolveLoader: {
modules: ['/usr/lib/nodejs'],
},
webpack, like other node tools (grunt, gulp) does not recognize global
modules. So we need to provide this path manually. But we could make
this path default with a patch in debian like we did for grunt and gulp,
patches welcome.
signature.asc
Description: OpenPGP digital signature
-- Pkg-javascript-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel
