Closed
Description
There are time when we it would be really nice to use the preprocessor in pre/post-js files.
I enabled this in #18525, but it got reverted in #19006 because not all JS files are pre-processor safe. For example, it turns out that using private JS fields confuses the pre-processor because they start with hash symbol (#). You can also imagine JS files that have {{{
or #
embedded in strings.
So, we need to find a way to enable the pre-processor, but perhaps not by default? Some kind of opt-in mechansim.
Options:
- A new set of arguments such as
--pre-js-processed=
/--post-js-processed=
? - Some kind of marker at the top of the file? Something like
use strict;
? e.g.use preprocessor;
? - Based on file extension
- Some other option.
So far I'm leaning towards (2).
Metadata
Metadata
Assignees
Labels
No labels