Issue Task Closed

#104815Support ECMAScript module file endings

Josef Glatz 09/04/24, 11:29 updated 12/02/25, 14:33

Description

Problem/Description

It’s quit common to use file ending mjs in the node-js universe in productive environments. There is no need to add them into DDEV’s .htaccess, but on at least 2 checked known TYPO3 hoster companies, mjs isn’t delivered with mime-type application/javascript (like js is).

My scenario where I had troubles

The reason for this issue was that I’m using datatables package in a TYPO3 backend module datatables.net-bs5. In the DDEV env all is working well. After deploying to production – in my case Mittwald (hey, I’m not bad-mouthing the host!) – a mime-type error occurs. First I thought that CSP could be problematic. After a quick research I came with the conclusion that this is a quite common file ending which should be added to core’s root-htaccess.

ToDo(s)

  • Add simple support for mjs via htaccess o-o-t-b in the TYPO3 core.

Acceptance Criteria

  • mjs file response contains an application/javascript mime-type

Reviews 2

History 25

  1. Gerrit Code Review pushed patch set 1 for main to change 85868 status Accepted Under Review <span data-processor="relativetime" data-value="2024-09-04T11:40:25+00:00" > 09/04/24, 11:40 </span>

  2. Anonymous commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-01-02T10:10:08+00:00" > 01/02/25, 10:10 </span>

    Applied in changeset commit:29ca79535a10dc2d5178882c3c5cdc8baa200028.