Minor Feature Request: Highlight .mjs as JavaScript in the devtools source editor for workspace files
Reported by
thejames...@gmail.com,
Nov 3 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36 Steps to reproduce the problem: Open any .mjs file that was added to the Sources workspace and it will be simply be highlighted as plaintext rather than JavaScript. NOTE: Files served by a webserver are highlighted correctly as Devtools does MIME checking, this only affects files that were added via Add File to workspace. What is the expected behavior? As Node.js is intending to support ES modules via the .mjs file extension it's likely to be commonly used in both Node.js and browser environments so it would be nice if Devtools supported highlighting those files as JavaScript by default. What went wrong? Devtools doesn't highlight .mjs files in all cases as explained above. Did this work before? N/A Chrome version: 64.0.3251.0 Channel: dev OS Version: Flash Version:
,
Nov 3 2017
,
Nov 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/41f6d9bb9df60f3e4b231dabe099a81a041e34f8 commit 41f6d9bb9df60f3e4b231dabe099a81a041e34f8 Author: Andrey Lushnikov <lushnikov@chromium.org> Date: Tue Nov 28 22:33:14 2017 DevTools: highlight *.mjs as javascript files This patch starts treating *.mjs files as javascript files. BUG= 781088 R=dgozman Change-Id: I58222d6b7ad3d1c3c3442048da9cf46692b23172 Reviewed-on: https://chromium-review.googlesource.com/794349 Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org> Cr-Commit-Position: refs/heads/master@{#519870} [modify] https://crrev.com/41f6d9bb9df60f3e4b231dabe099a81a041e34f8/third_party/WebKit/Source/devtools/front_end/common/ResourceType.js [modify] https://crrev.com/41f6d9bb9df60f3e4b231dabe099a81a041e34f8/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
,
Dec 6 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by krajshree@chromium.org
, Nov 3 2017Status: Untriaged (was: Unconfirmed)