#32319: Add support to HashedFilesMixin for ES modules
-------------------------------------+------------------------------------
Reporter: gilmrjc | Owner: gilmrjc
Type: New feature | Status: new
Component: contrib.staticfiles | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Comment (by Michael):
Replying to [comment:8 Mariusz Felisiak <felisiak.mariusz@…>]:
> In [changeset:"b7b3bbc8356b8365f3ab8ed9c8d863b47c18a3d4" b7b3bbc8]:
> {{{
> #!CommitTicketReference repository=""
revision="b7b3bbc8356b8365f3ab8ed9c8d863b47c18a3d4"
> [4.0.x] Fixed #33253 -- Reverted "Fixed #32319 -- Added ES module
support to ManifestStaticFilesStorage."
>
> This reverts commit 91e21836f667c784a8a63ab1f18d81f553e679cb.
>
> `export` and `import` directives have several syntax variants and not
> all of them were properly covered.
>
> Thanks Hervé Le Roy for the report.
> Backport of ba9ced3e9a643a05bc521f0a2e6d02e3569de374 from main
> }}}
Why is there support for `export`? I can't find any mention of export with
a url here:
https://developer.mozilla.org/en-
US/docs/web/javascript/reference/statements/export
Could you please provide an example of how `export` with a url works?
Please see my attempt which I am using in my code base:
https://github.com/django/django/pull/15177
It works with the following import statements:
{{{
import { name, draw, reportArea, reportPerimeter } from
'./modules/square.js';
import randomSquare from './modules/square.js';
import {default as randomSquare} from './modules/square.js';
import { newFunctionName, anotherNewFunctionName } from
'./modules/module.js';
import { function1 as newFunctionName,
function2 as anotherNewFunctionName } from './modules/module.js';
import { name, draw, reportArea, reportPerimeter } from
'./modules/square.js';
import { name, draw, reportArea, reportPerimeter } from
'./modules/circle.js';
import { name, draw, reportArea, reportPerimeter } from
'./modules/triangle.js';
import { name as squareName,
draw as drawSquare,
reportArea as reportSquareArea,
reportPerimeter as reportSquarePerimeter } from
'./modules/square.js';
import { squareName, drawSquare, reportSquareArea, reportSquarePerimeter }
from './modules/square.js';
import * as Canvas from './modules/canvas.js';
import { Square } from './modules/square.js';
import { Square, Circle, Triangle } from './modules/shapes.js';
import colors from './modules/getColors.js';
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32319#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.7720ac59cc8cb9e8ca2e7cd07a4de62f%40djangoproject.com.