Improve stub translations file creation using heredoc

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-15 15:49:30 +00:00
parent 4b77a07b1a
commit ac4e3a556f
2 changed files with 10 additions and 6 deletions

View file

@ -36,9 +36,11 @@ COPY webpack.config.js ./
RUN composer dump-autoload
# Create stub translations file for webpack build (real translations will be generated in final image)
RUN mkdir -p var/translations && \
echo 'export const messages = {};' > var/translations/index.js && \
echo 'export const localeFallbacks = {};' >> var/translations/index.js
RUN mkdir -p var/translations
COPY <<EOF var/translations/index.js
export const messages = {};
export const localeFallbacks = {};
EOF
# Copy package files and install node dependencies
COPY package.json yarn.lock ./

View file

@ -34,9 +34,11 @@ COPY webpack.config.js ./
RUN composer dump-autoload
# Create stub translations file for webpack build (real translations will be generated in final image)
RUN mkdir -p var/translations && \
echo 'export const messages = {};' > var/translations/index.js && \
echo 'export const localeFallbacks = {};' >> var/translations/index.js
RUN mkdir -p var/translations
COPY <<EOF var/translations/index.js
export const messages = {};
export const localeFallbacks = {};
EOF
# Copy package files and install node dependencies
COPY package.json yarn.lock ./