Skip to content

Commit

Permalink
Release 10.1.5
Browse files Browse the repository at this point in the history
Refine the `dist` step by creating a proper temporary file.

I spent a lot of time trying to pinpoint the underlying cause, why
translation chunk files are empty when generating a bundle with newer JS
features (i.e. not pinning preset-env to IE11) but couldn't find it.
  • Loading branch information
jcbrand committed Jun 30, 2023
1 parent c30569d commit e31d4c7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,16 @@ src/headless/dist/converse-headless.min.js: src webpack/webpack.common.js node_m

dist:: node_modules src/* | dist/website.css dist/website.min.css
npm run headless
# Ideally this should just be `npm run nodeps`.
# The additional steps are necessary to properly generate JSON files from
# the .po files. The nodeps config uses preset-env with IE11 to turn all
# template literals into old JS strings, which is required because
# gettext 0.21 doesn't support template literals.
# Ideally this should just be `npm run build`.
# The additional steps are necessary to properly generate JSON chunk files
# from the .po files. The nodeps config uses preset-env with IE11.
# Somehow this is necessary.
npm run nodeps
mkdir tmp && mv dist/locales tmp
npm run build
cp tmp/locales/*-po.js dist/locales/
rm -rf tmp
$(eval TMPD := $(shell mktemp -d))
mv dist/locales $(TMPD) && \
npm run build && \
mv $(TMPD)/locales/*-po.js dist/locales/ && \
rm -rf $(TMPD)

.PHONY: install
install:: dist
Expand Down

0 comments on commit e31d4c7

Please sign in to comment.