hack + notes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-01-28 02:37:38 +03:00
parent 8c62d1d222
commit 20ded309fe
2 changed files with 10 additions and 4 deletions

View File

@ -174,8 +174,8 @@ LESSC := npx lessc
# procs to access their paths (as is done below)
# 2) set path and launch a child make -- not sure how to
# do this...
#
ELECTRON := npx electron
# XXX stopped working while sharp started working out of the box...
ELECTRON_REBUILD := npx electron-rebuild
ASAR := npx asar
ELECTRON_VERSION_FALLBACK ?= v1.8.1
@ -641,6 +641,11 @@ $(BUILD_INFO): $(CSS_FILES) $(NODE_DIR) $(PROJECT_FILES) \
$(NODE_DIR): package.json
npm install
# patch requirejs (see: NOTES)
cp -f $(NODE_DIR)/requirejs/bin/r.js{,.bak}
cat $(NODE_DIR)/requirejs/bin/r.js.bak \
| sed 's/^\(#!\/\)/\/\/\1/' \
> $(NODE_DIR)/requirejs/bin/r.js
# NOTE: this may break on some systems due to a dependency issue...
# $(ELECTRON_REBUILD)
@touch "$@"

View File

@ -3,15 +3,16 @@ Hacks and fixes
===============
20220126:
- node_modules/requirejs/bin/r,js:
- node_modules/requirejs/bin/r,js
Under Electron v14+ requirejs breaks with a SyntaxError on the
first char of r.js ('#!/...') -- a hackish way to fix this is to
comment it out, not yet sure why is this happening...
STUB: patched by:
make node_modules
- cfg/requirejs.js:
- cfg/requirejs.js (FIXED)
.baseUrl calculation under U*IX systems needs a '/' prefixed...
Both issues are currently tweaked manually...