[wp-meta] [Making WordPress.org] #6723: Require source and map files for JS
Making WordPress.org
noreply at wordpress.org
Thu Feb 2 00:27:41 UTC 2023
#6723: Require source and map files for JS
------------------------------+-----------------------
Reporter: kkmuffme | Owner: (none)
Type: enhancement | Status: reopened
Priority: low | Milestone:
Component: Plugin Directory | Resolution:
Keywords: |
------------------------------+-----------------------
Comment (by dd32):
> This should be updated to require sourcemaps for compiled/minified JS
too
I'm not against adding a requirement for sourcemaps personally, but it's
not as easy as just "require a source map"..
Sourcemaps as generated by the majority of tools expect that the source is
bundled with the minified files, but as you've seen with WordPress.org
plugins, they're often not.. but sourcemaps DO allow for the source files
to be hosted at a different remote location, via a GitHub repo for
example.
What we'd probably need is published build steps on how to generate
source-maps for plugins that refer to a GitHub repo (or other public
location of the files), as an optional thing for quite some time before
requiring it, if we could even require it.
That would allow for plugins guideline 4 to be pragmatically verified,
which is something we can't really currently do, it has to be reviewed by
a human.
But, hosting the source-files remotely and referencing that location
through the sourcemap might make some fall afoul of guidelines 7/8
inadvertantly with plugins not being allowed to offload loading of
JS/CSS/image files.. although I guess it's not really offloading, as the
minified files would stil be in use, it's just developer tools inspecting
that would use them.
After saying all that.. I disagree that we should require it, but I think
we should educate authors on how to include a sourcemap that points to the
source files AND that if minified files are included the source location
MUST be included in the readme (which it often isn't)
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/6723#comment:11>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list