More details now I'm in less of a hurry:
This is my 0.15 with webpack-macros.html disabled, but I still haven't
looked at how broken its output is:
https://salsa.debian.org/python-team/packages/pydata-sphinx-theme/-/merge_requests/1
I also did some work on trying to build the full version, then reverted
it because I didn't want to upload unfinished experiments. Sorry that
this caused you to waste time redoing steps (node_version and skipping
node-css-minimizer-webpack-plugin) that I'd already had working. See
below if you still want to try.
On 11/10/2024 18:21, Rebecca N. Palmer wrote:
I didn't manage to get webpack to find the installed Javascript packages
(see the history of the above branch for what I tried). Notes for any
future attempt:
- Some other packages successfully use webpack (
https://codesearch.debian.net/search?q=%28%5E%7C%5B+%2C%5D%29webpack+path%3Adebian%2Fcontrol&literal=0 ), so looking at them and/or using pkg-js-tools might help. However, no other Debian package appears to use sphinx-theme-builder or nodeenv (heat-dashboard and masakari-dashboard say they build-depend on nodeenv but don't appear to actually run it).
- I suspect the error message
"/builds/rnpalmer-guest/pydata-sphinx-theme/debian/output/source_dir/src/node_modules doesn't exist or is not a directory" isn't actually accurate; it appears to come from https://sources.debian.org/src/node-enhanced-resolve/5.15.0-1/lib/ModulesInHierarchicalDirectoriesPlugin.js/?hl=75#L75, so adding some debug prints there might be a good investigation method.
We would probably also need to package some more Javascript modules:
node-sass (RFP #998024; that suggests that rsass or node-node-sass
*might* be an alternative), node-sass-loader, and newer versions of
libjs-popper.js and node-mini-css-extract-plugin.