mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1793573 - [devtools] Convert loader-plugin-raw.jsm to loader-plugin-raw.sys.mjs. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D158574
This commit is contained in:
parent
38067ca23e
commit
79f3e6c0de
@ -11,8 +11,8 @@
|
||||
var { Loader, Require, resolveURI, unload } = ChromeUtils.import(
|
||||
"resource://devtools/shared/loader/base-loader.js"
|
||||
);
|
||||
var { requireRawId } = ChromeUtils.import(
|
||||
"resource://devtools/shared/loader/loader-plugin-raw.jsm"
|
||||
var { requireRawId } = ChromeUtils.importESModule(
|
||||
"resource://devtools/shared/loader/loader-plugin-raw.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
|
@ -2,8 +2,6 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
/**
|
||||
@ -12,7 +10,7 @@ const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
* This function handles "raw!" and "theme-loader!" requires.
|
||||
* See also: https://github.com/webpack/raw-loader.
|
||||
*/
|
||||
const requireRawId = function(id, require) {
|
||||
export const requireRawId = function(id, require) {
|
||||
const index = id.indexOf("!");
|
||||
const rawId = id.slice(index + 1);
|
||||
let uri = require.resolve(rawId);
|
||||
@ -39,5 +37,3 @@ const requireRawId = function(id, require) {
|
||||
// result here.
|
||||
return data;
|
||||
};
|
||||
|
||||
const EXPORTED_SYMBOLS = ["requireRawId"];
|
@ -14,7 +14,7 @@ if CONFIG["MOZ_DEVTOOLS"] == "all":
|
||||
DevToolsModules(
|
||||
"base-loader.js",
|
||||
"builtin-modules.js",
|
||||
"loader-plugin-raw.jsm",
|
||||
"loader-plugin-raw.sys.mjs",
|
||||
"Loader.jsm",
|
||||
"worker-loader.js",
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user